N = gets.chomp.to_i

require 'complex'
root = Math.sqrt(N-1).floor
ans = 0

if N == 2
  puts 1
  exit
end

(1..root).each do |i|
  ans += ((N-1) / i)
  if N / i != i
    ans +=( ((N-1)/i) - ((N-1)/(i+1)))*i
  end
end

puts ans