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