#include<stdio.h>
int main()
{
    int n;
    int sum;
    scanf("%d", &n);
    sum = 2*n + n*(n-1)*3/2;
    printf("%d", sum);
    return 0;
}