program summary
  real :: sum, sum1
  integer :: n

  sum = 1.
  sum1 = 0.
  n = 1

  do while ( sum > sum1 )
     sum1 = sum
     n = n + 1.
     sum = sum + 1./n
     if(mod(n , 1000) == 0) print*,'n = ', n,',  sum = ', sum
  enddo

  print*, 'End after ',n,'-steps, sum = ', sum
end program summary
