import sys sys.setrecursionlimit(10 ** 7) input = sys.stdin.readline f_inf = float('inf') mod = 10 ** 9 + 7 def resolve(): x = int(input()) if x >= 50: print(0) exit() res = [1005483469, 7483469, 998998, 355065, 153009, 70685, 33758, 16414, 8065, 3988, 1979, 985, 491, 245, 122, 61, 30, 15, 7, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] print(res[x]) if __name__ == '__main__': resolve()