input""n p=1 for i=1to n?i; if i=p?:c=c+1:p=p+c+1 next