#include<bits/stdc++.h>
#define MX 5000 + 10
using namespace std;
int flage[MX];
typedef long long LL;
int f(int x) {
if (flage[x] != 0) {
return flage[x];
}
if (x == 1 || x == 2) {
return x;
}
flage[x] = f(x - 1) + f(x - 2);
return flage[x];
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
cout << f(n);
return 0;
}