#include <iostream>
#include <cmath>
using namespace std;
const int MAXN = 35;
int main()
{
__int64 a[MAXN], b[MAXN];
a[2] = 0; b[2] = 0;
a[3] = 8; b[3] = 4;
for (int i = 4; i < 32; i++)
{
a[i] = 4 * a[i - 1];
a[i] += (__int64)(pow(2.0, i - 1) * 2) - 4;
__int64 temp = (__int64)(pow(4.0, i - 2) - pow(2.0, i - 2)) * 2 - b[i - 1];
a[i] += temp;
b[i] = 2 * a[i - 1] + temp;
}
for (int N = 2; N <= 31; N++)
{
cout << "N=" << N << ": " << a[N] << endl;
}
return 0;
}