#include<stdio.h> long long a[50] = { 0 }; long long recrusion(int n) { if (n<3 || a[n]>0) { return a[n]; } return a[n] = recrusion(n - 1) + recrusion(n - 2); } int main() { int n; a[0] = 0; a[1] = 1; a[2] = 2; while (~scanf("%d", &n)) { recrusion(n); printf("%lld ", a[n]); } return 0; }