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).
# LUOGU_RID: 128696787
print([0, 1, 3, 15, 63, 2010, 2028, 2088, 2130, 2136, 2178, 2220, 2280, 2310, 2466, 2538, 2550, 2556, 2559, 2616, 2706, 2718, 2790, 2850, 3018, 3036, 3040, 3060, 3066, 3071, 3108, 3166, 3168, 3180, 3186, 3318, 3330, 3358, 3390, 3466, 3498, 3526, 3528, 3556, 3583][int(input())])