George has recently entered the BSUCP (Berland State University for Cool Programmers). George has a friend Alex who has also entered the university. Now they are moving into a dormitory. 

George and Alex want to live in the same room. The dormitory has n rooms in total. At the moment the i-th room has p_{i} people living in it and the room can accommodate q_{i} people in total (p_{i} ≤ q_{i}). Your task is to count how many rooms has free place for both George and Alex.


-----Input-----

The first line contains a single integer n (1 ≤ n ≤ 100) — the number of rooms.

The i-th of the next n lines contains two integers p_{i} and q_{i} (0 ≤ p_{i} ≤ q_{i} ≤ 100) — the number of people who already live in the i-th room and the room's capacity.


-----Output-----

Print a single integer — the number of rooms where George and Alex can move in.


-----Examples-----
Input
3
1 1
2 2
3 3

Output
0

Input
3
1 10
0 10
10 10

Output
2

Difficulty: interview

Starter code:

Solutions:
n=int(input())
ans=0
for i in range(n):
    a,b=map(int,input().split())
    if b-a>=2: ans+=1
print(ans)

n = int(input())
ans = 0
for i in range(n):
    p,q = map(int,input().split())
    if q-p>=2:
        ans+=1

print(ans)

n = int(input())
res = 0
for _ in range(n):
	p, q = map(int, input().split())
	if(q-p>=2):
		res+=1
print(res)

n = int(input())
ans = 0
for i in range(n):
	p, q = list(map(int, input().split()))
	ans += (q - p) >= 2
print(ans)


n = int(input())
ans = 0
for i in range(n):
    a, b = map(int, input().split())
    if b - a >= 2:
        ans += 1
print(ans)

n = int(input())
count = 0
for i in range(n):
    p, q = list(map(int, input().split()))
    if q - p >= 2:
        count += 1
print(count)


n=int(input())
ans=0
for i in range(n):
    p,q=map(int,input().split())
    if q-p>=2:
        ans+=1
print(ans)

n = int(input())
ans = 0
for i in range(n):
    p, q = map(int, input().split())
    if q - p >= 2:
        ans += 1
print(ans)

n = int(input())
result = 0
for i in range(n):
    p, q = map(int, input().split())
    if q - p > 1:
        result += 1;
print(result)

n = int(input())
cnt = 0
for i in range(0, n):
    p, q = input().split(" ")
    if int(q) - int(p) >= 2:
        cnt += 1
print (cnt)


m=0
n=int(input())
while(n):
    p,q=list(map(int,input().split(" ")))
    if(q-p>=2):
        m+=1
    n-=1
print(m)


n=int(input())
rez=0
for i in range(n):
    a,b=list(map(int,input().split()))
    if(b-a)>=2:
        rez+=1
print(rez)


__author__ = 'sonerik'

import sys

inp = sys.stdin
# inp = open("input.txt")

n = int(inp.readline())

free = 0

for line in inp:
    p, q = map(int, line.strip().split())
    if q - p >= 2:
        free += 1

print(free)

n = int(input())
val = 0
for i in range(n):
    p, q = (int(x) for x in input().split())
    if q - p >= 2:
        val += 1
print(val)

n = int(input())
cnt = 0
for i in range(n):
    p, q = map(int, input().split())
    if p <= q - 2:
        cnt += 1
print(cnt)

print(sum((lambda x: x[0] + 2 <= x[1])(list(map(int, input().split()))) for x in range(int(input()))))


n = int(input())
cnt = 0
for i in range(n):
    a, b = list(map(int, input().split()))
    if b - a >= 2:
        cnt += 1
print(cnt)


n=int(input())
m=list()
for i in range(n):
    m.append(list(int(x) for x in input().split()))
c=0
for i in range(n):
    if (m[i][0]+2)<=m[i][1]:
        c+=1
print(c)

n = int(input())
ans = 0
for i in range(n):
	x,y = [int(x) for x in input().split()]
	if y-x>=2:
		ans+=1
print(ans)

n = int(input())
k = 0
lst = []

for i in range(n):
    lst = list(map(int, input().split()))
    if lst[1] - lst[0] >= 2:
        k =k+ 1
print(k)

n = int(input())
k = 0
for i in range(n):
    x, y = [int(x) for x in input().split()]
    if y - x >= 2:
        k += 1
print(k)

n = int(input())
count = 0
for i in range(n):
	line = [int(j) for j in input().split()]
	if line[1] - line[0] > 1:
		count += 1
print(count)

n = int(input())
i = 0
true = 0
while i<n:
    a,b=list(map(int,input().split()))
    c = b-a
    if c>=2:
        true+=1
    i+=1
print(true)
    
    


n = int(input())
count = 0
for i in range(n):
    p, q = map(int, input().split())
    if q - p >= 2:
        count += 1
print(count)

n = int(input())
s, p, q = 0, [0] * n, [0] * n
for i in range(n):
    p[i], q[i] = [int(x) for x in input(). split()]
    if q[i] - p[i] > 1:
        s += 1
print(s)