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