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