#include /// /// 入力された数字を返す /// /// long long ReadNum() { char c = getchar(); long long num = 0; while (c != '\n') { num = num * 10 + c - '0'; c = getchar(); } return num; } int main() { printf("%lld\n", 316+ ((ReadNum()-1)*52)); }