#include <bits/stdc++.h> using namespace std; int n; int a[55] = {0,0,1,1,1}; int main() { for(int i=5;i<=50;i++) { a[i]=a[i-1]+a[i-2]; } while(cin>>n && n!=0) { cout<<a[n]<<endl; } }