#include <iostream>
int spaceA(int n);
int spaceB(int n);
using namespace std;
int main(void)
{
int n;
while (cin >> n)
cout << spaceA(n) << endl;
return 0;
}
int spaceA(int n)
{
if (n == 1)
return 2;
else
return spaceA(n-1)+spaceB(n-1);
}
int spaceB(int n)
{
if (n == 1)
return 2;
else
return spaceB(n-1)+n;
}
/*
數學遞迴式
A1 = 2
An = An-1+Bn-1
--------------------------
B1 = 2
Bn = Bn-1+n
*/