n = int(input()) if n == 1: print(1051) elif n == 2: print(10275) else: print(841341)