#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>

long int sumOfGroup(int k) {
    // Return the sum of the elements of the k'th group.
   long grp=((k*(k+1))/2);
   int cnt=1;
    long sum=0;
    long ele=++grp;;
   while(cnt<=k)
   {
      sum+=ele;
       ++cnt;
       ele+=2;
   }
    return sum;
}

int main() {
    int k; 
    scanf("%i", &k);
    long int answer = sumOfGroup(k);
    printf("%ld\n", answer);
    return 0;
}