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