#include using namespace std; int main() { int N; cin >> N; cout << ( 316 + ( ( N - 1 ) * 52 ) ) << endl; return 0; }