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