#include <iostream>
using namespace std;

#include <cmath>

int main()
{
	int n;
	for(int i = 1; i <= 40; ++i)
	{
		cin >> n;
		cout << int(0.7236068 * pow((sqrt(5) - 1) / 2, 1 - n) + 0.5) << endl;
	}
	return 0;
}