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