#include <bits/stdc++.h>
#define int long long
using namespace std;
int n,a[1000005];
int mod=1e8+7;
signed main() {
cin>>n;
a[0]=1,a[1]=1,a[2]=2,a[3]=4;
for(int i=4;i<=n;i++){
for(int j=1;j<=4;j++){
a[i]+=a[i-j];
a[i]%=mod;
}
}cout<<a[n];
}
05-09
708
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-29
7212
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-30
3208
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)