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