Sets free of sums
Let us be given a natural number $N$. Consider the set of different integers $\{a_1, a_2, \dots, a_k\}$, where each number lies in the range from $0$ to $N-1$ inclusive. Let's call such a set sum-free if there are no three numbers in this set such that the sum of two of them is comparable to the third modulo $N$. Strictly speaking, we call a set sum-free if for each triple (not necessarily distinct) indices $x$, $y$ and $z$ ($1\leq x,y,z\leq k$) the inequality holds: $$(a_x+a_y) \bmod N\neq a_z$$
where $p\bmod q$ is the remainder of dividing $p$ by $q$.
For example, for $N=6$, sets free of sums are not, for example, $\{0\}$ (because $(0+0)\bmod 6=0$), $\{1,2\}$ ( because $(1+1) \bmod 6=2$), $\{3,4,5\}$ ( because $(4+5)\bmod 6=3$), but the set $\{1,3,5\}$ is sum-free.
Given $N$, determine how many sum-free sets there are.
The input file contains a single integer $N$. It is guaranteed that $1\leq N\leq 35$.
In the output file, output one number — the answer to the problem.
All sum—free sets for $N=6$ are the following: $\{5\}$, $\{4\}$, $\{3\}$, $\{3,5\}$, $\{3,4\}$, $\{2\}$, $\{2,5\}$, $\{2,3\}$, $\{1\}$, $\{1,5\}$, $\{1,4\}$, $\{1,3\}$, $\{1,3,5\}$, $\{\}$ (the last set is empty, i.e. it does not contain any elements, with $k=0$ — it is also considered free of sums).
2
2
6
14