rt,我搜索不带记忆化过了...(雾
#include <bits/stdc++.h>
#define int long long
using namespace std;
static const int N=1000000;
int f[N];
int x[N];
int n,m,k;
inline void Run(int x){
m++;
if(x==1){
return;
}
for(int i=(x>>1);i>0;i--){
Run(i);
}
}
signed main(){
std::cin.tie(nullptr) -> sync_with_stdio(false);
std::cout.tie(nullptr)-> sync_with_stdio(false);
cin>>k;
Run(k);
cout<<m;
return 0;
}