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