PAROVI

Count the nonempty sets of coprime pairs from 1 to N that cross every split point x, modulo 1,000,000,000.

Medium7CombinatoricsGraphNumber theoryNo attempts yetTime limit1sMemory limit64 MB

Problem

Mirko and Slavko play a game. Mirko moves first: he picks a non-empty set of pairs of integers between 11 and NN, where the two numbers of a pair are different and coprime. For N=5N = 5, one possible choice is {{1,2},{3,4},{2,5},{3,5}}\{\{1, 2\}, \{3, 4\}, \{2, 5\}, \{3, 5\}\}.

Slavko moves second, and he looks for a split point of Mirko's set. Mirko's set has a split point if there is an integer xx in {2,3,,N}\{2, 3, \ldots, N\} such that every pair {a,b}\{a, b\} of the set satisfies one of the following:

  • a<xa < x and b<xb < x
  • axa \ge x and bxb \ge x

For example, the set {{1,2},{3,4}}\{\{1, 2\}, \{3, 4\}\} has the split point x=3x = 3. Whenever a split point exists, Slavko finds it.

Mirko wins when Slavko finds no split point. Count how many different sets of pairs Mirko can pick and be sure of winning. The count can be very large, so print it modulo 10000000001\,000\,000\,000.

Input

The first line contains the integer NN (1N201 \le N \le 20).

Output

Print the required count on the first and only line.

Hint

For N=2N = 2 the only set that meets the requirement is {{1,2}}\{\{1, 2\}\}.

For N=3N = 3, one set that meets the requirement is {{1,3},{1,2}}\{\{1, 3\}, \{1, 2\}\}.