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