#include<iostream> using namespace std; int main(){ int sum=0; int i=1; while(sum<=1000) { sum+=i; i++; } cout<<i-1; return 0; }