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