#include #include #include #include #include #include #include long sumOfGroup(long k) { // Return the sum of the elements of the k'th group. if(k == 1) return 1; else{ if(k % 2 == 0) return ((k+1) + (k+3) ); else return ((k + 4) + (k + 6) + (k + 8)); } } int main() { long k; scanf("%ld", &k); long answer = sumOfGroup(k); printf("%ld\n", answer); return 0; }