规律都帮大家找好了
![](https://img-blog.csdnimg.cn/img_convert/42e02bdeb7d4977baabab25c0472a3e0.png)
#include<bits/stdc++.h>
using namespace std;
const int N=1e3+10;
int f[N];
int n;
int main(){
cin>>n;
f[1]=1,f[2]=2;
for(int i=3;i<=n;i++){
int t=i/2;
while(t){
f[i]+=f[t];
t--;
}
f[i]+=1;
}
cout<<f[n];
return 0;
}