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