//{{{ #include using namespace std; //}}} int main(void){ int N; cin >> N; printf("%d\n", 316 + 52 * (N - 1)); return 0; }