A new cottage village called «Flatville» is being built in Flatland. By now they have already built in «Flatville» *n* square houses with the centres on the *Оx*-axis. The houses' sides are parallel to the coordinate axes. It's known that no two houses overlap, but they can touch each other.

The architect bureau, where Peter works, was commissioned to build a new house in «Flatville». The customer wants his future house to be on the *Оx*-axis, to be square in shape, have a side *t*, and touch at least one of the already built houses. For sure, its sides should be parallel to the coordinate axes, its centre should be on the *Ox*-axis and it shouldn't overlap any of the houses in the village.

Peter was given a list of all the houses in «Flatville». Would you help him find the amount of possible positions of the new house?
The first line of the input data contains numbers *n* and *t* (1 ≤ *n*, *t* ≤ 1000). Then there follow *n* lines, each of them contains two space-separated integer numbers: *x*<sub class="lower-index">*i*</sub> *a*<sub class="lower-index">*i*</sub>, where *x*<sub class="lower-index">*i*</sub> — *x*-coordinate of the centre of the *i*-th house, and *a*<sub class="lower-index">*i*</sub> — length of its side ( - 1000 ≤ *x*<sub class="lower-index">*i*</sub> ≤ 1000, 1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 1000).
2 2
0 4
6 2
4
2 2
0 4
5 2
3
2 3
0 4
5 2
2
1 1
1 1
2
1 2
2 1
2
2 1
2 1
1 1
2
2 2
0 4
7 4
4
4 1
-12 1
-14 1
4 1
-11 1
5
6 15
19 1
2 3
6 2
-21 2
-15 2
23 1
2
10 21
-61 6
55 2
-97 1
37 1
-39 1
26 2
21 1
64 3
-68 1
-28 6
6
26 51
783 54
-850 6
-997 59
573 31
-125 20
472 52
101 5
-561 4
625 35
911 14
-47 33
677 55
-410 54
13 53
173 31
968 30
-497 7
832 42
271 59
-638 52
-301 51
378 36
-813 7
-206 22
-737 37
-911 9
35
14 101
121 88
-452 91
635 28
-162 59
-872 26
-996 8
468 86
742 63
892 89
-249 107
300 51
-753 17
-620 31
-13 34
16
3 501
827 327
-85 480
-999 343
6
2 999
-999 471
530 588
4
22 54
600 43
806 19
-269 43
-384 78
222 34
392 10
318 30
488 73
-756 49
-662 22
-568 50
-486 16
-470 2
96 66
864 16
934 15
697 43
-154 30
775 5
-876 71
-33 78
-991 31
30
17 109
52 7
216 24
-553 101
543 39
391 92
-904 67
95 34
132 14
730 103
952 118
-389 41
-324 36
-74 2
-147 99
-740 33
233 1
-995 3
16
4 512
-997 354
-568 216
-234 221
603 403
4
3 966
988 5
15 2
-992 79
6
2 1000
-995 201
206 194
4
50 21
-178 1
49 1
-98 1
-220 1
152 1
-160 3
17 2
77 1
-24 1
214 2
-154 2
-141 1
79 1
206 1
8 1
-208 1
36 1
231 3
-2 2
-130 2
-14 2
34 1
-187 2
14 1
-83 2
-241 1
149 2
73 1
-233 3
-45 1
197 1
145 2
-127 2
-229 4
-85 1
-66 1
-76 2
104 1
175 1
70 1
131 3
-108 1
-5 4
140 1
33 1
248 3
-36 3
134 1
-183 1
56 2
9
50 1
37 1
-38 1
7 1
47 1
-4 1
24 1
-32 1
-23 1
-3 1
-19 1
5 1
-50 1
11 1
-11 1
49 1
-39 1
0 1
43 1
-10 1
6 1
19 1
1 1
27 1
29 1
-47 1
-40 1
-46 1
-26 1
-42 1
-37 1
13 1
-29 1
-30 1
3 1
44 1
10 1
4 1
-14 1
-2 1
34 1
18 1
-33 1
-44 1
9 1
-36 1
-7 1
25 1
22 1
-20 1
-41 1
43
50 1
-967 7
696 7
-366 4
557 1
978 2
800 4
-161 2
-773 2
-248 2
134 3
869 6
-932 2
-262 14
191 3
669 2
72 5
0 1
757 8
859 2
-131 8
-169 3
543 10
-120 2
-87 8
-936 6
-620 3
-281 11
684 3
886 10
497 4
380 4
833 1
-727 6
470 11
584 9
66 6
-609 12
-661 4
-57 8
628 7
635 4
-924 3
-982 4
-201 7
-9 8
-560 9
712 7
-330 8
-191 1
-892 7
96
1 1000
0 1000
2
n,t=map(int,input().split())
p={}
a=[]
for i in range(n):
    x,y=map(float,input().split())
    p[x]=y
    a.append(x)
a.sort()
count=2
for i in range(1,n):
    x=a[i] - a[i-1] - (p[a[i]]/2)-(p[a[i-1]]/2)
    if x==t:
        count+=1
    elif x>t:
        count+=2
print(count)