#include <stdio.h>
int main(void)
{
	int a;
	int b;
	a=0;
	b=0;
	do{
		b=b+1;
		a=a+b;
	}while(a<1000);
	printf("最後に足した数は%dです\n",b);
	return 0;
}
