N = int(input()) print([0, 1, 10000000019, 10000000033, 10000000061, 10000000069, 10000000097, 10000000103, 10000000121, 10000000141, 10000000147, 10000000207][N])