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