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