#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 4000000000000000001 int main(){ string s = "co"; rep(i,10000)s += 'c'; rep(i,10000)s += 'o'; long long M; cin>>M; vector pos(s.size()+1,0); long long x = 0,y = 0; rep(i,s.size()){ if(s[i]=='c')x++; else{ y += x; } pos[i+1] = y; } cout< cnt(s.size()+1,0); for(int i=s.size();i>=0;i--){ //cout<=pos[i]){ cnt[i]++; M -= pos[i]; } } //cout<