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