#include using namespace std; int N; // n<=200 int MAX = 1000000000; int array[201]; int brray[201]; int crray[201]; int drray[201]; int erray[201]; void fun() { array[0] = 1; array[1] = 1; array[2] = 2; brray[2] = brray[1] = brray[0] = 0; crray[2] = crray[1] = crray[0] = 0; drray[2] = drray[1] = drray[0] = 0; erray[2] = erray[1] = erray[0] = 0; for(int i = 3; i < 201; i++) { int tempA = array[i-1] + array[i-2]; array[i] = tempA % MAX; int tempB = brray[i-1] + brray[i-2] + tempA / MAX; brray[i] = tempB % MAX; int tempC = crray[i-1] + crray[i-2] + tempB / MAX; crray[i] = tempC % MAX; int tempD = drray[i-1] + drray[i-2] + tempC / MAX; drray[i] = tempD % MAX; int tempE = erray[i-1] + erray[i-2] + tempD / MAX; erray[i] = tempE % MAX; // printf("%d%09d%09d%09d%09d ", erray[i], drray[i], crray[i], brray[i], array[i]); } } int main() { fun(); while(cin >> N) { if(erray[N] != 0) printf("%d%09d%09d%09d%09d\n", erray[N], drray[N], crray[N], brray[N], array[N]); else if(drray[N] != 0) printf("%d%09d%09d%09d\n", drray[N], crray[N], brray[N], array[N]); else if(crray[N] != 0) printf("%d%09d%09d\n", crray[N], brray[N], array[N]); else if(brray[N] != 0) printf("%d%09d\n", brray[N], array[N]); else printf("%d\n", array[N]); } return 0; }