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