def aribon(N): return 316 + (N - 1) * 52 print(aribon(int(input())))