import math
def solution(n, stations, w):
answer = 0
s = stations.pop(0)
start = s-w ; end = s+w ; l = w*2+1
answer += math.ceil((start-1)/l)
for i in stations:
if end < i-w:
start = i-w
answer += math.ceil((start-end-1)/l)
end = i+w
else:
end = i+w
if end >= n:
pass
else:
answer += math.ceil((n-end)/l)
return answer