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