#include #include #include #include #include using namespace std; typedef long long ll; #define SORT(x) sort((x).begin(), (x).end()) #define RSORT(x) sort((x).begin(), (x).end(), greater() ) int main() { ll n; cin >> n; cout << 316 + (n - 1) * 52 << endl; }