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