fun main(args:Array<String>){
    val N = readLine()!!.toInt()
    var alys =  (0..N-1).map{readLine()!!.split(" ").map{it.toLong()}.let { Pair(it[0] - it[1], it[1] + it[0]) }}
    var k = -100000000000
    var a = 0

    val alys_sort = alys.sortedBy { it.second }

    for(aly in alys_sort){
       if(aly.first >= k){
           a++
           k = aly.second
       }
    }
    println(a)
}