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