//HJ100 等差数列
#include <stdio.h>
int main(void) {
int n = 0;
while (~scanf("%d", &n)) {
//等差求和:sn=n*a1+((n*(n-1)/2)*d
printf("%d\n", n * 2 + ((n * (n - 1) / 2) * 3));
}
return 0;
}
//HJ100 等差数列
#include <stdio.h>
int main(void) {
int n = 0;
while (~scanf("%d", &n)) {
//等差求和:sn=n*a1+((n*(n-1)/2)*d
printf("%d\n", n * 2 + ((n * (n - 1) / 2) * 3));
}
return 0;
}