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