Sonya decided that having her own hotel business is the best way of earning money because she can profit and rest wherever she wants.

The country where Sonya lives is an endless line. There is a city in each integer coordinate on this line. She has $n$ hotels, where the $i$-th hotel is located in the city with coordinate $x_i$. Sonya is a smart girl, so she does not open two or more hotels in the same city.

Sonya understands that her business needs to be expanded by opening new hotels, so she decides to build one more. She wants to make the minimum distance from this hotel to all others to be equal to $d$. The girl understands that there are many possible locations to construct such a hotel. Thus she wants to know the number of possible coordinates of the cities where she can build a new hotel. 

Because Sonya is lounging in a jacuzzi in one of her hotels, she is asking you to find the number of cities where she can build a new hotel so that the minimum distance from the original $n$ hotels to the new one is equal to $d$.
The first line contains two integers $n$ and $d$ ($1\leq n\leq 100$, $1\leq d\leq 10^9$) — the number of Sonya's hotels and the needed minimum distance from a new hotel to all others.

The second line contains $n$ different integers in strictly increasing order $x_1, x_2, \ldots, x_n$ ($-10^9\leq x_i\leq 10^9$) — coordinates of Sonya's hotels.
4 3
-3 2 9 16
6
5 2
4 8 11 18 19
5
10 10
-67 -59 -49 -38 -8 20 41 59 74 83
8
10 10
0 20 48 58 81 95 111 137 147 159
9
100 1
0 1 2 3 4 5 7 8 10 11 12 13 14 15 16 17 19 21 22 23 24 25 26 27 28 30 32 33 36 39 40 41 42 46 48 53 54 55 59 60 61 63 65 68 70 71 74 75 76 79 80 81 82 84 88 89 90 91 93 94 96 97 98 100 101 102 105 106 107 108 109 110 111 113 114 115 116 117 118 120 121 122 125 126 128 131 132 133 134 135 137 138 139 140 143 144 146 147 148 149
47
1 1000000000
-1000000000
2
2 1000000000
-1000000000 1000000000
3
100 2
1 3 5 6 8 9 12 13 14 17 18 21 22 23 24 25 26 27 29 30 34 35 36 39 41 44 46 48 52 53 55 56 57 59 61 63 64 66 68 69 70 71 72 73 75 76 77 79 80 81 82 87 88 91 92 93 94 95 96 97 99 100 102 103 104 106 109 110 111 112 113 114 115 117 118 119 120 122 124 125 127 128 129 130 131 132 133 134 136 137 139 140 141 142 143 145 146 148 149 150
6
100 3
0 1 3 6 7 8 9 10 13 14 16 17 18 20 21 22 24 26 27 30 33 34 35 36 37 39 42 43 44 45 46 48 53 54 55 56 57 58 61 63 64 65 67 69 70 72 73 76 77 78 79 81 82 83 85 86 87 88 90 92 93 95 96 97 98 99 100 101 104 105 108 109 110 113 114 115 116 118 120 121 123 124 125 128 130 131 132 133 134 135 136 137 139 140 141 142 146 147 148 150
2
1 1000000000
1000000000
2
10 2
-93 -62 -53 -42 -38 11 57 58 87 94
17
2 500000000
-1000000000 1000000000
4
100 10
-489 -476 -445 -432 -430 -421 -420 -418 -412 -411 -404 -383 -356 -300 -295 -293 -287 -276 -265 -263 -258 -251 -249 -246 -220 -219 -205 -186 -166 -157 -143 -137 -136 -130 -103 -86 -80 -69 -67 -55 -43 -41 -40 -26 -19 -9 16 29 41 42 54 76 84 97 98 99 101 115 134 151 157 167 169 185 197 204 208 226 227 232 234 249 259 266 281 282 293 298 300 306 308 313 319 328 331 340 341 344 356 362 366 380 390 399 409 411 419 444 455 498
23
1 1000000000
999999999
2
1 1
-5
2
2 1
-1000000000 1000000000
4
1 2
1
2
4 5
0 20 40 60
8
1 1
-10
2
1 1
-1000000000
2
1 1000000000
0
2
1 2
-10
2
1 1
2
2
1 5
-100
2
2 1000000000
999999999 1000000000
2
2 2
0 5
4
1 2
-5
2
1 1
1
2
1 5
-20
2
2 100000000
-1000000000 1000000000
4
1 1000000000
147483641
2
3 3
1 8 9
4
2 1
1 1000000000
4
1 2
-4
2
2 1
-1000000000 -1
4
n, d = map(int, input().split())
s = list(map(int, input().split()))
ans = 2
for i in range(n-1):
    # print(abs(s[i+1] - s[i]))
    if abs(s[i+1] - s[i]) == d*2:
        ans += 1
    elif abs(s[i+1] - s[i]) > d*2:
        ans += 2
print(ans)