1 #include<iostream>
2 #include<cstring>
3 #include<cstdio>
4 using namespace std;
5 int n,ans;
6 void dfs(int x)
7 {
8 if(x==0){
9 ans++;return ;
10 }
11 else if(x<2&&x!=0) return;
12 dfs(x-2);
13 dfs(x-3);
14 }
15 int main()
16 {
17 scanf("%d",&n);
18 dfs(n);
19 printf("%d",ans);
20 return 0;
21 }
1 #include<cstdio>
2 #define ll long long
3 using namespace std;
4 ll f[155];
5 int main() {
6 int n;
7 scanf("%d", &n);
8 f[1]=0; f[2]=f[3]=1;
9 for(int i=4;i<=n;i++) f[i]=f[i-2]+f[i-3];
10 printf("%lld\n", f[n]);
11 return 0;
12 }
13 // 这题居然是递推!!!!!!