#include using namespace std; int main(int argc, const char *argv[]) { size_t N; cin >> N; cout << 316UL + 52UL * (N - 1) << endl; return 0; }