class Problem
  attr_accessor :a, :b, :n, :m, :h, :w, :dp

  def initialize
    @l,@r,@d = gets.to_s.split.map{ |v| v.to_i }
  end

  def solve
    a = @r / @d
    b = (@l - 1) / @d
    a - b
  end

  def show(ans)
    puts ans
  end
end

Problem.new.instance_eval do
  show(solve)
end
