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