We have a cord whose length is a positive integer. We will perform the following condition until the length of the cord becomes at most 2:

* Operation: Cut the rope at two positions to obtain three cords, each with a length of a positive integer. Among these, discard one with the longest length and one with the shortest length, and keep the remaining one.



Let f(N) be the maximum possible number of times to perform this operation, starting with a cord with the length N.

You are given a positive integer X. Find the maximum integer N such that f(N)=X.

Constraints

* 1 \leq X \leq 40

Input

The input is given from Standard Input in the following format:


X


Output

Print the value of the maximum integer N such that f(N)=X.

Example

Input

2


Output

14
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using vint = vector<int>;
using vvint = vector<vint>;
using vvvint = vector<vvint>;
using vll = vector<ll>;
using uint = unsigned int;
using ull = unsigned long long;
template <typename T>
using uset = unordered_set<T>;
template <typename T1, typename T2>
using umap = unordered_map<T1, T2>;
constexpr int INF = (1 << 30) - 1;
constexpr ll LLINF = 1LL << 60;
constexpr int dy[] = {1, 0, -1, 0, 1, -1, -1, 1};
constexpr int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr char el = '\n';
constexpr int mod = 1000000007;
template <typename T>
T gcd(T a, T b) {
  return (b ? gcd(b, a % b) : a);
}
template <typename T>
T lcm(T a, T b) {
  return (a / gcd(a, b) * b);
}
template <typename T1, typename T2>
inline void chmin(T1 &a, T2 b) {
  if (a > b) a = b;
}
template <typename T1, typename T2>
inline void chmax(T1 &a, T2 b) {
  if (a < b) a = b;
}
template <typename T>
ostream &operator<<(ostream &os, vector<T> &v) {
  for (auto &u : v) os << u << el;
  return (os);
}
template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
  for (auto &u : v) is >> u;
  return (is);
}
template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
  return (is >> p.first >> p.second);
}
int main() {
  ll X;
  cin >> X;
  ll val = 2;
  for (int i = 0; i < X; i++) {
    val = val * 3 - 1;
  }
  cout << val << endl;
  return (0);
}
