#include <iostream>
#include <vector>
using namespace std;
bool fibon_elem(int pos, int& elem)
{
if (pos <= 0 || pos > 1024)
{
elem = 0;return false;
}//判断是否符合范围
elem = 1;
int n_2 = 1, n_1 = 1;
for (int ix = 3;ix <= pos;++ix) {
elem = n_2 + n_1;
n_2 = n_1;n_1 = elem;
}//得到指定的elem
return true;
}
int main()
{
int elem, i = 0;int a;
int pos[100];
while (1) {
cin >> pos[i++];//有循环的话,输入的数就会分段进去比如1 2 3 4就是先1进去得到结果,再2 再3
if (fibon_elem(pos[i - 1], elem))
{
cout << elem << " ";
}
}
}