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