N = int(input()) print([0, 1, 20000000038, 20000000066, 20000000122, 20000000138, 20000000194, 20000000206, 20000000242, 20000000282, 20000000294, 20000000414][N])