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