def main(): version = int(input()) first_version = 316 page = first_version + (version - 1) * 52 print(page) if __name__ == '__main__': main()