def main
  # min = ARGV[0].to_i
  # max = ARGV[1].to_i
  # multiple = ARGV[2].to_i
  min, max, multiple = gets.split(' ')
  min = min.to_i
  max = max.to_i
  multiple = multiple.to_i
  
  return puts 0 if multiple == 0
  min_multi = (min / multiple) * multiple
  min_multi = min_multi + multiple if min_multi < min
  max_multi = (max / multiple) * multiple

  return puts 0 if max_multi == 0

  count = (max_multi - min_multi) / multiple + 1
  

  return puts count
end

main