def version_n(n:int): n-=1 return 316 + 52 * n print(version_n(int(input())))