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