#include<cstdio>
#include<cstring>
typedef long long ll;
const int mod=1e9+7;
struct Mat
{
int n;
int m;
ll num[2][2];
Mat () {
memset(num,0,sizeof(num));
}
};
Mat operator * (Mat a,Mat b)
{
Mat c;
c.n=a.n;
c.m=b.m;
for(int i=0;i<c.n;++i)
for(int j=0;j<c.m;++j) {
for(int k=0;k<a.m;++k)
c.num[i][j]=(c.num[i][j]+a.num[i][k]*b.num[k][j]%mod)%mod;
// printf("%d\n",c.num[i][j]);
}
return c;
}
Mat operator ^ (Mat a,int k)
{
Mat b;
b.n=a.n;
b.m=a.m;
for(int i=b.n;i>=0;--i)
b.num[i][i]=1;
while(k) {
if(k&1) b=b*a;
a=a*a;
k>>=1;
}
return b;
}
int main()
{
Mat yuan;
yuan.n=2;
yuan.m=2;
yuan.num[0][0]=1;
yuan.num[0][1]=1;
yuan.num[1][0]=1;
yuan.num[1][1]=0;
Mat fir;
fir.n=1;
fir.m=2;
fir.num[0][0]=1;
fir.num[0][1]=1;
int q;
scanf("%d",&q);
Mat ask=yuan^(q-1);
Mat ans=fir*ask;
printf("%lld\n",ans.num[0][0]);
return 0;
}