import sys from collections import defaultdict try: import mydebug def dprint(*objects): print(*objects) except: def dprint(*objects, sep='', end='\n'): pass n = int(input()) ans = 316 + 52 * (n - 1) print(ans)