lines = []
while line = gets
    lines << line.chomp.split(' ')
end
 xxx = 0
lines.each_with_index do |column,i|
    next if i <= 1 
 xxx += 1 if (column[0].to_i - lines[i-1][0].to_i).abs > lines[0][1].to_i
  end

puts lines[0][0].to_i - xxx