N = int(input()) if N == 1: print(1281) elif N == 2: print(10438) else: print(841341)