#include<iostream>

using namespace std;

//递推法求斐波那契数
//需要将中间值进行存储

const int MAXN = 35;

int fibonacci[MAXN];    //存储斐波那契数

void Initial(){
	fibonacci[0] = 0;
	fibonacci[1] = 1;
	for(int i = 2; i < MAXN; ++i){
		fibonacci[i] = fibonacci[i -1] + fibonacci[i - 2];
	}
}

int main(){
	Initial();
	int n;
	while(scanf("%d",&n) != EOF){
		printf("%d\n",fibonacci[n]);
	}
	return 0;
}