#include<bits/stdc++.h> using namespace std; int main(){ int i,n,w=1,s,o=1; cin>>n; for(i=1;o<=n;i++){ for(w=1;w<=i;w++){ s+=i; } o+=i; } cout<<s; return 0; } /************************************************************** Problem: 1520 User: houshanglin Language: C++ Result: Wrong Answer ****************************************************************/