#include using namespace std; using pint = pair< int, int >; using ull = unsigned long long; template< typename T > void output( T&& range ) { for_each( begin( range ), end( range ), []( auto&& t ) { cerr << t << endl; } ); } int main() { ull n = 0; cin >> n; cout << 316 + 52 * ( n - 1 ) << endl; }