Consider the following equation: 

Let's find all integer *z* (*z* &gt; 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* &gt; 0), for which the given above equation holds.

Let's write out all such *z* in the increasing order: *z*<sub class="lower-index">1</sub>, *z*<sub class="lower-index">2</sub>, *z*<sub class="lower-index">3</sub>, and so on (*z*<sub class="lower-index">*i*</sub> &lt; *z*<sub class="lower-index">*i* + 1</sub>). Your task is: given the number *n*, find the number *z*<sub class="lower-index">*n*</sub>.
The first line contains a single integer *n* (1 ≤ *n* ≤ 40).

mod = int(1e9+7)

def binpow(a,b):
    res = 1
    while b > 0:
        if b&1:
            res = res*a%mod
        b >>= 1
        a = a*a%mod
    
    return res

Mersenne_Primes = [2,3,5,7,13,17,19,31,61,89,107,127,521,607,1279,
 2203,2281,3217,4253,4423,9689,9941,11213,19937,
 21701,23209,44497,86243,110503,132049,216091,
 756839,859433,1257787,1398269,2976221,3021377,
 6972593,13466917,20996011,24036583,25964951,
 30402457,32582657,37156667,42643801,43112609,
 57885161]

n = int(input())
print((binpow(2,Mersenne_Primes[n-1]-1)-1+mod)%mod)