#include <cstdio> using namespace std; int countNum(int n) { if(n < 3) { return 1; } else{ return countNum(n-1) + countNum(n-2); } } int main() { int n; while(EOF != scanf("%d", &n)) { printf("%d\n", countNum(n)); } return 0; }
#include <cstdio> using namespace std; int countNum(int n) { if(n < 3) { return 1; } else{ return countNum(n-1) + countNum(n-2); } } int main() { int n; while(EOF != scanf("%d", &n)) { printf("%d\n", countNum(n)); } return 0; }