integer N
integer P,minP
integer,allocatable::A(:)
integer ans
read*,N
allocate(A(N))
do i=1,N
  read*,A(i)
end do

ans=A(1)-1
j=2
do i=2,N
  if(A(i)==j)then
    j=j+1
    cycle
  endif
  if(A(I)<j)cycle
  if(mod(A(i),j)==0)A(i)=A(i)-1
  ans=ans+A(i)/j
end do

print"(i0)",ans

end