def main(): n = int(input()) if n == 1: ans = 1261 elif n == 2: ans = 10275 else: ans = 841341 print(ans) if __name__ == "__main__": main()