#define _CRT_SECURE_NO_WARNINGS #include int main(void) { long long int N; scanf("%lld", &N); printf("%lld\n", 316 + 52 * (N - 1)); return 0; }