n = int(input()) if n == 1: print(1481) if n == 2: print(10947) if n == 3: print(305005)