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