#!/usr/bin/env ruby
n = gets.chomp.to_i
result = 0

(n-1).times do | a |
  (n-1).times do | b |
    (n-1).times do | c |
      result += 1 if (a+1) * (b+1) + (c+1) == n
    end
  end
end

puts result
