fun main(args: Array<String>) {
    val N = readInputLine().toInt()

    val robots = Array(N) { val (X, L) = readInputLine().split(" ").map { it.toLong() }; Pair(X, L)}.sortedBy { r -> val (X, L) = r; X + L }

    var pos = Long.MIN_VALUE
    var ans = 0

    for (r in robots) {
        val (X, L) = r
        if (pos <= X - L) {
            ans++
            pos = X + L
        }
    }

    println(ans)
}

fun readInputLine(): String {
    return readLine()!!
}
