program t integer::a(100),b,c,i read(*,*)b c=0 do i=1,100 a(i)=a(i)+1 c=a(i)+c if (a(i)==b) exit end do write(*,*)c end program t