#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream& print(ostream& out, const T& begin, const T& end) {
  if (begin != end) {
    T it = begin;
    out << *(it++);
    while (it != end) out << ' ' << *(it++);
  }
  return out;
}
template <typename T>
ostream& operator<<(ostream& out, const vector<T>& v) {
  return print(out, (v).begin(), (v).end());
}
template <typename T>
ostream& operator<<(ostream& out, const list<T>& l) {
  return print(out, (l).begin(), (l).end());
}
template <typename T>
ostream& operator<<(ostream& out, const set<T>& s) {
  return print(out, (s).begin(), (s).end());
}
long long binpow(long long x, long long y) {
  long long ans = 1;
  while (y) {
    if (y & 1) {
      ans *= x;
    }
    y >>= 1;
    x *= x;
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  cout << (9 * n - 3) * binpow(4, n - 3) << '\n';
  return 0;
}
