N = gets.to_i

list = []

(1..10**6-1).each do |a|
  (a..10**6-1).each do |b|
    break if a * b >= N
    c = N - a * b
    list << [a, b, c]
  end
end

add_list = []
list.each do |l|
  next if l[0] == l[1]
  add_list << [l[1], l[0], l[2]]
end

puts list.count + add_list.count