DP
#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
int n,f[N][2];//f[i][0]前i个字符以0结尾不含连续1的01串的个数
int main(){//f[i][1]前i个字符以1结尾不含连续1的01串的个数
cin>>n;
f[1][0]=f[1][1]=1;
for(int i=2;i<=n;i++){
//如果第i个字符是1,则 第i-1个字符只能放0
f[i][1]=f[i-1][0];
//如果第i个字符是0,则 第i-1个字符既可以是0也可以是1
f[i][0]=f[i-1][0]+f[i-1][1];
}
cout<<f[n][0]+f[n][1]<<endl;
return 0;
}