The sequence A(x) is built as follows:
, where
is XOR operation. For a given k count all integer x such that Ak + 1 = A1 = x holds. Since the answer may be very big, print it modulo 109 + 7.
Input contains one integer k (1 ≤ k ≤ 109).
Print one integer — answer to the problem modulo 109 + 7. If for the given k there are infinitely many possible x, print - 1 instead.
2
3
260
15
| Name |
|---|


