def main():
    n = int(input().strip())
    points = []
        
    for i in range(0, n):
        xs, rs = input().strip().split()
        x, r = int(xs), int(rs)
        points.append((x-r, -i-1))
        points.append((x+r, i+1))

    points.sort()
    count = 0
    prev = 0
    nest = 0
    for _, c in points:
        if c == -prev and nest == 1:
            count += 1
        if c<0:
            nest += 1
        else:
            nest -=1
        prev = c

    print(count)

if __name__ == '__main__': 
    main()