#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int mersn[] = {
    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};
int ans[] = {2,         4,         16,        64,        4096,      65536,
             262144,    73741817,  536396504, 140130951, 487761806, 319908071,
             106681875, 373391777, 317758024, 191994804, 416292237, 110940210,
             599412199, 383601261, 910358879, 532737551, 348927937, 923450986,
             470083778, 642578562, 428308067, 485739299, 419990028, 287292017,
             202484168, 389339972, 848994101, 273206870, 853092283, 411696553,
             876153854, 90046025,  828945524, 697988360};
int pw(int x, int p) {
  int ret = 1;
  while (p) {
    if (p & 1) {
      ret = (1LL * ret * x) % mod;
    }
    p /= 2;
    x = (1LL * x * x) % mod;
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int n;
  cin >> n;
  cout << ans[n - 1] - 1 << '\n';
}
