#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a[60], b, cc = 0, n, i;
  cin >> n;
  a[1] = 0;
  for (i = 1; i <= 55; i++) {
    a[i] = (i * 2) + cc;
    cc += a[i];
  }
  cout << a[n] << endl;
  return 0;
}
