class Integer
    def d_list
        return [1] if self == 1
        (1..Math.sqrt(self).to_i).select do |i|
            self%i == 0
        end.map {|e| [e, self/e]}.flatten.uniq.sort
    end
end
cnt=0
N=gets.to_i
N.d_list.each do |e|
    cnt+=N/e-1 if e<N/e-1
end
puts cnt