#include using namespace std; using ll=long long; ll mod=1000000007; ll INF=1LL<<60; int main() { ll N; cin >> N; cout << 316+52*(N-1) << endl; }