#include <bits/stdc++.h>
int n, x;
long long y;
long long num[1000];
int main() {
  int i, j, k;
  scanf("%d", &n);
  if (n == 1)
    x = 1;
  else if (n == 2)
    x = 2;
  else if (n == 3)
    x = 4;
  else if (n == 4)
    x = 6;
  else if (n == 5)
    x = 12;
  else if (n == 6)
    x = 16;
  else if (n == 7)
    x = 18;
  else if (n == 8)
    x = 30;
  else if (n == 9)
    x = 60;
  else if (n == 10)
    x = 88;
  else if (n == 11)
    x = 106;
  else if (n == 12)
    x = 126;
  else if (n == 13)
    x = 520;
  else if (n == 14)
    x = 606;
  else if (n == 15)
    x = 1278;
  else if (n == 16)
    x = 2202;
  else if (n == 17)
    x = 2280;
  else if (n == 18)
    x = 3216;
  else if (n == 19)
    x = 4252;
  else if (n == 20)
    x = 4422;
  else if (n == 21)
    x = 9688;
  else if (n == 22)
    x = 9940;
  else if (n == 23)
    x = 11212;
  else if (n == 24)
    x = 19936;
  else if (n == 25)
    x = 21700;
  else if (n == 26)
    x = 23208;
  else if (n == 27)
    x = 44496;
  else if (n == 28)
    x = 86242;
  else if (n == 29)
    x = 110502;
  else if (n == 30)
    x = 132048;
  else if (n == 31)
    x = 216090;
  else if (n == 32)
    x = 756838;
  else if (n == 33)
    x = 859432;
  else if (n == 34)
    x = 1257786;
  else if (n == 35)
    x = 1398268;
  else if (n == 36)
    x = 2976220;
  else if (n == 37)
    x = 3021376;
  else if (n == 38)
    x = 6972592;
  else if (n == 39)
    x = 13466916;
  else if (n == 40)
    x = 20996010;
  y = 1;
  for (i = 1; i <= x; i++) {
    y *= 2;
    y %= 1000000007;
  }
  y -= 1;
  if (y < 0) {
    y += 1000000007;
  }
  printf("%I64d", y);
  getchar();
  getchar();
}

### Prompt

Generate a Cpp solution to the following problem:

Consider the following equation: 

<image> where sign [a] represents the integer part of number a.

Let's find all integer z (z > 0), for which this equation is unsolvable in positive integers. The phrase "unsolvable in positive integers" means that there are no such positive integers x and y (x, y > 0), for which the given above equation holds.

Let's write out all such z in the increasing order: z1, z2, z3, and so on (zi < zi + 1). Your task is: given the number n, find the number zn.

Input

The first line contains a single integer n (1 ≤ n ≤ 40).

Output

Print a single integer — the number zn modulo 1000000007 (109 + 7). It is guaranteed that the answer exists.

Examples

Input

1


Output

1

Input

2


Output

3

Input

3


Output

15

### Response

```cpp
#include <bits/stdc++.h>
int n, x;
long long y;
long long num[1000];
int main() {
  int i, j, k;
  scanf("%d", &n);
  if (n == 1)
    x = 1;
  else if (n == 2)
    x = 2;
  else if (n == 3)
    x = 4;
  else if (n == 4)
    x = 6;
  else if (n == 5)
    x = 12;
  else if (n == 6)
    x = 16;
  else if (n == 7)
    x = 18;
  else if (n == 8)
    x = 30;
  else if (n == 9)
    x = 60;
  else if (n == 10)
    x = 88;
  else if (n == 11)
    x = 106;
  else if (n == 12)
    x = 126;
  else if (n == 13)
    x = 520;
  else if (n == 14)
    x = 606;
  else if (n == 15)
    x = 1278;
  else if (n == 16)
    x = 2202;
  else if (n == 17)
    x = 2280;
  else if (n == 18)
    x = 3216;
  else if (n == 19)
    x = 4252;
  else if (n == 20)
    x = 4422;
  else if (n == 21)
    x = 9688;
  else if (n == 22)
    x = 9940;
  else if (n == 23)
    x = 11212;
  else if (n == 24)
    x = 19936;
  else if (n == 25)
    x = 21700;
  else if (n == 26)
    x = 23208;
  else if (n == 27)
    x = 44496;
  else if (n == 28)
    x = 86242;
  else if (n == 29)
    x = 110502;
  else if (n == 30)
    x = 132048;
  else if (n == 31)
    x = 216090;
  else if (n == 32)
    x = 756838;
  else if (n == 33)
    x = 859432;
  else if (n == 34)
    x = 1257786;
  else if (n == 35)
    x = 1398268;
  else if (n == 36)
    x = 2976220;
  else if (n == 37)
    x = 3021376;
  else if (n == 38)
    x = 6972592;
  else if (n == 39)
    x = 13466916;
  else if (n == 40)
    x = 20996010;
  y = 1;
  for (i = 1; i <= x; i++) {
    y *= 2;
    y %= 1000000007;
  }
  y -= 1;
  if (y < 0) {
    y += 1000000007;
  }
  printf("%I64d", y);
  getchar();
  getchar();
}

```