program c179

implicit none
integer :: n, a, z, c
real :: b

read *, n

z = 0

do a = 1, n
 b = real(n) / real(a)
 c = int(b)
 z = z + c
 if(a*c == n) then
  z = z - 1
 end if
end do

print *, z

end program c179