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