시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 256 MB 3 2 2 66.667%

문제

Suppose that $n$ players participate in a single-elimination tournament. The tournament goes round-by-round. Let $k$ be the number of remaining players at the beginning of the round. Then they will randomly form $[\frac{k}{2}]$ pairs. Any possible partition can be chosen with equal probability. In each pair, two players play against each other, one of them wins, and the loser quits the tournament. The remaining $[\frac{k + 1}{2}]$ advance to the next round.

It is known that each participant has a unique rating, and the outcome of each game is completely determined by the ratings: whoever has higher rating will win. So, the only thing that affects the schedule of the tournament is the random partitions into pairs each round. Can you calculate the number of different tournaments that could occur? Two tournaments are called different if there is a game (between two participants) in one of the tournaments that doesn't occur in the other tournament. As the answer can be rather large, calculate this number modulo $2^{64}$.

입력

The input contains one integer $n$: the initial number of players in the tournament ($1 \le n \le 10^{18}$).

출력

Output the number of different tournaments modulo $2^{64}$.

예제 입력 1

4

예제 출력 1

3

예제 입력 2

5

예제 출력 2

45