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