N = int(input()) ans = 316 + 52 * (N-1) print(ans)