Problem:
 Score : 200 points    Problem Statement AtCoDeer the deer found two rectangles lying on the table, each with height 1 and width W .
If we consider the surface of the desk as a two-dimensional plane, the first rectangle covers the vertical range of [0,1] and the horizontal range of [a,a+W] , and the second rectangle covers the vertical range of [1,2] and the horizontal range of [b,b+W] , as shown in the following figure:   AtCoDeer will move the second rectangle horizontally so that it connects with the first rectangle.
Find the minimum distance it needs to be moved.      Constraints  All input values are integers.  1≤W≤10^5  1≤a,b≤10^5         Input The input is given from Standard Input in the following format:  W  a  b       Output Print the minimum distance the second rectangle needs to be moved.        Sample Input 1 3 2 6      Sample Output 1 1  This input corresponds to the figure in the statement. In this case, the second rectangle should be moved to the left by a distance of 1 .       Sample Input 2 3 1 3      Sample Output 2 0  The rectangles are already connected, and thus no move is needed.       Sample Input 3 5 10 1      Sample Output 3 4

Solution (Python):
w,a,b=map(int,input().split())
print(b-a-w if b>a+w else a-b-w if a>b+w else 0)

Solution (Python):
w, a, b = map(int, input().split())
if a <= b <= a+w or a <= b+w <= a+w or b <= a <= b+w or b <= a+w <= b+w:
    print(0)
else:
    if a < b:
        print(b-a-w)
    else:
        print(a-b-w)

Solution (Python):
W,a,b=map(int,input().split())
M=max(a,b)-min(a,b)-W
print([0,M][M>0])

Solution (Python):
w,a,b=input().split()
w,a,b=int(w),int(a),int(b)

if b+w<a:
    print(a-(b+w))
elif a+w<b:
    print(b-(a+w))
else:
    print(0)

Solution (Python):
w,a,b = map(int,input().split())
if a<b:
  if a+w<b:
    print(b-(a+w))
  else:
    print(0)
elif a>b:
  if b+w<a:
    print(a-(b+w))
  else:
    print(0)
else:
  print(0)

Solution (Python):
w, a, b = map(int, input().split())
if a < b:
  print(max(0, b-a-w))
else:
  print(max(0, a-b-w))

Solution (Python):
w, a, b = map(int, input().split())
if a <= a + w <= b <= b + w:
    print(abs(b - a - w))
elif b <= b + w <= a <= a + w:
    print(abs(a - b - w))
elif a <= b <= a + w <= b + w:
    print(0)
elif b <= a <= b + w <= a + w:
    print(0)
elif b <= a <= b + w <= a + w:
    print(0)

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(1000000)


W, a, b = map(int, input().split())
aw = a+W

if (aw <= b):
    print(b-aw)
elif a<=b and b < aw:
    print(0)
elif b <= a:
    print(a-(b+W))

Solution (Python):
w,a,b=map(int,input().split())
print(max(abs(b-a)-w,0))

Solution (Python):
W,a,b = map(int, input().strip().split(' '))
if a < b:
  print(b-(a+W) if a+W < b else 0)
else:
  print(a-(b+W) if b+W < a else 0)

Solution (Python):
w,a,b = map(int,input().split())
if a+w < b:
  print(b-a-w)
elif b+w > a:
  print(0)
else:
  print(a-b-w)

Solution (Python):
w,a,b=map(int,input().split())
print(max(abs(a-b)-w,0))

Solution (Python):
w, a, b = map(int, input().split())
if a < b:
  if a + w < b:
    print(b - (a + w))
  else:
    print(0)
else:
  if b + w < a:
    print(a - (b + w))
  else:
    print(0)

Solution (Python):
W,a,b = map(int, input().split())
p = min(a,b)+W
if p >= max(a,b):
    print(0)
else:
    print(max(a,b) - p)

Solution (Python):
w,a,b=map(int,input().split());print(max(0,b-a-w,a-b-w))

Solution (Python):
W, a, b = map(int, input().split())
if a+W < b:
  r = b-a-W
elif b+W < a:
  r = a-b-W
else:
  r = 0
print(r)

Solution (Python):
W,a,b = map(int,input().split())
print(max(0,b-a-W,a-b-W))

Solution (Python):
w,a,b=map(int,input().split())
arr=sorted([a,b])
print(max(0,arr[1]-w-arr[0]))

Solution (Python):
w,a,b=map(int,input().split())
if a+w<=b:
  print(b-a-w)
elif a<=b and b<=a+w:
  print(0)
elif b<=a and a<=b+w:
  print(0)
else:
  print(a-b-w)

Solution (Python):
w,a,b=map(int,input().split())
print(max(max(a,b)-(min(a,b)+w),0))

Solution (Python):

W, a, b = map(int,input().split())

if a + W < b:
    print(b - (a+W))
elif b + W < a:
    print(a - (b + W))
elif a <= b <= a+W or b <= a <= b+W:
    print(0)

Solution (Python):
w, a, b = map(int, input().split())
if b > a + w:
    print(b-a-w)
elif a > b + w:
    print(a-b-w)
else:
    print(0)

Solution (Python):
W, a, b = map(int, input().split())
print(max(0, (abs(a - b) - W)))

Solution (Python):
W , a, b = list(map(int,input().split(' ')))
if a+W <b:
  ans = (b-a-W)
elif b+W<a:
  ans = (a-b-W)
else:
  ans  = 0
  
print(ans)

Solution (Python):

import sys
INF = float("inf")


def solve(W: int, a: int, b: int):
    print(max(abs(a-b)-W, 0))
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    W = int(next(tokens))  
    a = int(next(tokens))  
    b = int(next(tokens))  
    solve(W, a, b)


if __name__ == '__main__':
    main()

Solution (Python):
w,a,b=map(int,input().split())
right = max(a,b)
left = min(a,b)+w
if right<=left:
    print(0)
else:
    print(right-left)

Solution (Python):
W, a, b = map(int, input().split())

c = min(a, b)
d = max(a, b)

print(max(d - (c + W), 0))

Solution (Python):
W,a,b=map(int, input().split())
print(max(0, abs(a-b)-W))

Solution (Python):
w,a,b=map(int,input().split())
print(max(abs(a-b)-w,0))

Solution (Python):
w, a, b = map(int, input().split())
x = abs(a - b) - w
print(max(x, 0))

Solution (Python):
W, a, b = map(int, input().split())

if b <= a+W <= b+W:
  print (0)
else:
  print (min(abs(b-a-W), abs(a-b-W)))

Solution (Python):
w, a, b = map(int, input().split())
dis = abs(a - b) - w
print(max(dis, 0))

Solution (Python):

import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random
 




 
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    W,a,b = inputMap()
    tmp1 = abs((a+W) - b)
    tmp2 = abs(a-(b+W))
    
    if b <= (a+W) and b >= a:
        print(0)
        sys.exit()
    if b+W <= (a+W) and b+W >= a:
        print(0)
        sys.exit()
    print(min(tmp1,tmp2))
    
    
if __name__ == "__main__":
	main()

Solution (Python):
w,a,b=map(int,input().split())
if ((a<=b)and(b<=(a+w)))or((a<=(b+w))and((b+w)<=(a+w))):
  print(0)
else:
  print(min(abs(b-(a+w)),abs(a-(b+w))))

Solution (Python):
w, a, b = map(int, input().split())
print(max(b - w - a, 0, a - w - b))

Solution (Python):
W, a, b = map(int, input().split())
if a > b:
    ans = max(a - (b + W), 0)
else:
    ans = max(b - (a + W), 0)
print(ans)

Solution (Python):
w,a,b=map(int,input().split())

if a+w<b:
    print(b-(a+w))
elif b+w<a:
    print(a-(b+w))
else:
    print(0)

Solution (Python):
w, a, b = map(int, input().split())

if a > b:
    a, b = b, a

if a + w >= b:
    print(0)
else:
    print(b - (a + w))

Solution (Python):
W,a,b = map(int,input().split())
if W < a-b:
  print(a-b-W)
elif W < b-a:
  print(b-a-W)
else:
  print(0)

Solution (Python):
w, a, b = map(int, input().split())
print(max(0, abs(b-a)-w))

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

w, a, b = map(int, input().split())
if (a + w < b):
    print(b - (a + w))
elif (b + w < a):
    print(a - (b + w))
else:
    print(0)

Solution (Python):
W,a,b = map(int,input().split())
if a>b:
    a,b=b,a
if b>a+W:
    print(b-(a+W))
else:
    print(0)

Solution (Python):
import sys
input=sys.stdin.readline

w,a,b = map(int, input().split())
if (a <= b and b <= a+w) or (a <= b+w and b+w <= a+w):
    print(0)
elif a+w < b:
    print(b-(a+w))
else:
    print(a-(b+w))

Solution (Python):
w,a,b = map(int,input().split())
if a <= b <= a+w:
  print(0)
else:
  print(min( abs(a+w-b) , abs(b+w-a) ))

Solution (Python):
w,a,b = map(int,input().rstrip().split())
if abs(a-b)-w <= 0:
    print(0)
else:
    print(abs(a-b)-w)

Solution (Python):
w,a,b = map(int, input().split())

if a > b:
    a,b = b,a 
ans = b-(w+a)
if ans < 0:
    ans = 0
print(ans)

Solution (Python):
w,*a, = list(map(int, input().split()))
aa = sorted(a)

if aa[0]+w >= aa[1]:
    print(0)
else:
    print(aa[1]-aa[0]-w)

Solution (Python):
W,a,b = map(int, input().split())

if a < b:
  print(b - (a+W) if a+W < b else 0)
else:    
  print(a - (b+W) if b+W < a else 0)

Solution (Python):
w,a,b = list(map(int, input().split()))
if(b <= (a + w) and (a + w) <= (b + w)):
  print(0)
elif(b <= a and a <= (b + w)):
  print(0)
else:
  if((a + w) <= b):
  	print(b - (a + w))
  else:
    print(a - (b + w))

Solution (Python):
W,a,b = map(int,input().split())
a,b = min(a,b),max(a,b)
print(max(0,b-(a+W)))

Solution (Python):


def resolve():
    w, a, b = map(int, input().split())
    ans = 0

    if a < b < a+w or a < b+w < a+w:
        ans = 0
    elif a+w < b:
        ans = b - (a+w)
    elif b+w < a:
        ans = a - (b+w)

    print(ans)


if __name__ == "__main__":
    resolve()

Solution (Python):
W, a, b = map(int, input().split())

if a+W < b:
  print( b-(a+W) )
elif b+W < a:
  print( a-(b+W) )
else:
  print(0)

Solution (Python):
w, a, b = map(int, input().split())
if a + w <= b:
    print(b - (a + w))
elif (b + w) <= a:
    print(a - (b + w))
elif a + w >= b > a:
    print(0)
elif b <= a and (b + w) <= (a + w):
    print(0)

Solution (Python):
w,a,b = map(int,input().split())

if b+w < a:
    print(a-b-w)
elif a<=b+w and a+w>=b:
    print(0)
else:
    print(b-a-w)

Solution (Python):
w,a,b = map(int,input().split())

if b >= a + w:
    print(b - a - w)
elif a >= b + w:
    print(a - b - w)
else:
    print(0)

Solution (Python):
w,a,b = map(int,input().split())
if b+w >= w+a >= b:
  print(0)
elif w+a < b:
  print(b-(a+w))
else:
  print(a-(b+w))

Solution (Python):
w,a,b=map(int,input().split())

if a<=b:
    print(max(b-a-w,0))
else:
    print(max(a-b-w,0))

Solution (Python):
W, a, b = map(int, input().split())
ans = 0
if a < b and (a + W) < b:
    ans = abs((a + W) - b)
elif a > b and (b + W) < a:
    ans = abs((b + W) - a)

print(ans)

Solution (Python):
W, A, B = map(int, input().split())
if A > B:
  print(max(0, A-(B+W)))
else:
  print(max(0, B-(A+W)))

Solution (Python):
w,a,b =list(map(int,input().split()))

if a < b:
    print(max(0,b-a-w))
else:
    print(max(0,a-b-w))

Solution (Python):
def main():
    W, a, b = map(int, input().split())
    m = max(a, b) - min(a, b) - W
    if m > 0:
        print(m)
    else:
        print(0)


main()

Solution (Python):
w,a,b = map(int,input().split())
if b > w+a:
  print(b-w-a)
elif a > w+b:
  print(a-w-b)
else:
  print(0)

Solution (Python):
W,a,b=[int(x) for x in input().split()]
print(max(b-(a+W),a-(b+W),0))

Solution (Python):
w, a, b = map(int,input().split())  

if (b > a):
    print(max(0, b-a-w))
else:
    print(max(0, a-b-w))

Solution (Python):
W,a,b = map(int,input().split())

if a+W < b:
    print(b-(a+W))
elif b+W < a:
    print(a-(b+W))
else:
    print(0)

Solution (Python):

import sys, math, fractions, itertools


def solve(W: int, a: int, b: int):
    if (b-a-W)*(b+W-a) < 0:
        print(0)
    else:
        print(min(abs(b-a-W), abs(b+W-a)))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    W = int(next(tokens))  
    a = int(next(tokens))  
    b = int(next(tokens))  
    solve(W, a, b)

if __name__ == '__main__':
    main()

Solution (Python):
W, a, b = map(int, input().split())
a_box = [i for i in range(a, a+W+1)]
b_box = [i for i in range(b, b+W+1)]

if a_box[0] in b_box or a_box[-1] in b_box:
    print(0)
else:
    if a < b:
        print(abs((a+W)-b))
    elif a > b:
        print(abs(a-(b+W)))

Solution (Python):
w,a,b=map(int,input().split())
if a<b:
  if a+w<b:
    print(b-a-w)
  else:
    print(0)
elif a>b:
  if b+w<a:
    print(a-b-w)
  else:
    print(0)
else:
  print(0)

Solution (Python):
w, a, b = map(int, input().split())
if a <= b <= a+w or a <= b+w <= a+w:
    print(0)
else:
    print(min(abs(a+w - b,), abs(-a+b+w)))

Solution (Python):
w, a, b = map(int, input().split())
print(max(abs(b - a) - w, 0))

Solution (Python):
w,a,b = map(int, input().split())
if a <= b <= a+w or a <= b+w <= a+w:
    print(0)
elif a+w < b:
    print(b-(a+w))
elif b+w < a:
    print(a-(b+w))

Solution (Python):
W,a,b=map(int,input().split())
if a<b:
  if a+W<b:
    print(b-(a+W))
  else:
    print(0)
elif a==b:
  print(0)
else:
  if b+W<a:
    print(a-(b+W))
  else:
    print(0)

Solution (Python):
W, a, b = map(int, input().split())

if b > a + W:
    print(b - (a + W))
elif a > b + W:
    print(a - (b + W))
else:
    print(0)

Solution (Python):
w, a, b = map(int, input().split())
if b <= a <= b + w:
    print(0)
elif b <= a+w <= b+w:
    print(0)
elif a <= b <= a + w:
    print(0)
elif a <= b+w <= a+w:
    print(0) 
elif a+w < b :
    print(b-a-w)
elif b+w < a :
    print(a-b-w)

Solution (Python):
W,a,b = list(map(int,input().split()))
print(max(abs(b-a)-W,0))

Solution (Python):
W,a,b = list(map(int,input().split()))
print(max(abs(b-a)-W,0))

Solution (Python):
W,a,b = list(map(int,input().split()))
z = sorted([a,b])
print(max(z[1]-z[0]-W,0))

Solution (Python):


def main():
    w, a, b = map(int, input().split())
    a, b = min(a, b), max(a, b)
    print(max(b - a - w, 0))







if __name__ == '__main__':
    main()

Solution (Python):
w, a, b = map(int, input().split())
print(max(0, b-a-w, a-b-w))

Solution (Python):
w, a, b = map(int, input().split())
a_list = [a, a+w]
b_list = [b, b+w]
if a_list[0]>b_list[1]:
    print(a_list[0]-b_list[1])
elif a_list[1]<b_list[0]:
    print(b_list[0]-a_list[1])
else:
    print(0)

Solution (Python):
W,a,b = map(int,input().split())

if a <= b:
    if a + W <b:
        print(b-(a+W))
    else:
        print(0)

else:
    if b +W <a:
        print(a-(b+W))
    else:
        print(0)

Solution (Python):
w, a, b = map(int, input().split())

minx = min(a, b)
maxx = max(a, b)

ans = maxx-(minx+w)

if ans<=0:
    print(0)
else:
    print(ans)

Solution (Python):
W, A, B = map(int, input().split())
ans = 0
if A+W < B:
	ans = B - A - W
if B+W < A:
	ans = A - B - W
print(ans)

Solution (Python):
w, a, b = map(int, input().split())

if a <= a + w <= b <= b + w:
    print(b - a - w)
elif a <= b <= a + w <= b + w:
    print(0)
elif b <= a <= a + w <= b + w:
    print(0)
elif b <= b + w <= a <= a + w:
    print(a - b - w)

Solution (Python):
W,a,b = map(int, input().split())

if a > b:
    if a < b+W:
        ans = 0
    else:
        ans = a - (b+W)
elif a < b:
    if b < a+W:
        ans = 0
    else:
        ans = b-(a+W)
else:
    ans = 0
print(ans)

Solution (Python):

w, a, b = map(int, input().split(' '))

if b+w < a:
    print(a-(b+w))
elif a+w < b:
    print(b-(a+w))
else:
    print(0)

Solution (Python):
w, a, b = map(int, input().split())

aw = a + w
bw = b + w

if aw < b:
  print(b-aw)
elif bw < a:
  print(a-bw)
else:
  print(0)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    a, b = LS()
    if a == b:
        print("H")
    else:
        print("D")
    return


def B():
    w, a, b = LI()
    a, b = min(a, b), max(a, b)
    if w + a >= b:
        print(0)
        return
    print(b-a-w)
    return


def C():
    return


def D():
    return


if __name__ == '__main__':
    B()

Solution (Python):
W,a,b=map(int,input().split())
if b>=a:
	print(0 if b-a-W<1 else b-a-W)
else:
	print(0 if a-b-W<1 else a-b-W)

Solution (Python):
w, a, b = map(int, input().split())
if a > b: a, b = b, a
print(max(0, b - (a + w)))

Solution (Python):
W, a, b = map(int, input().split())
if a > b:
    a, b = b, a
if a + W < b:
    print(b - (a + W))
else:
    print(0)

Solution (Python):
def main():
    w,a,b=map(int,input().split(' '))
    print(max(abs(a-b)-w,0))
if __name__ == '__main__':
    main()

Solution (Python):
w,a,b=map(int,input().split())
print(max(0,abs(a-b)-w))

Solution (Python):
w, a, b = map(int, input().split())
aw = a + w
bw = b + w
if a < aw < b < bw:
    print(b-aw)
elif b < bw < a < aw:
    print(a-bw)
else:
    print(0)

Solution (Python):
W, a, b = map(int, input().split())

if a > b :
    a, b = b, a
    
if a + W > b :
    print(0)
else :
    print(b - a - W)

Solution (Python):
import sys
w,a,b=map(int,input().split())
if b>a+w:
  resul=b-a-w
elif a>b:
  b+=w
  resul=a-b
elif a+w>=b or a==b:
  resul=0
print(resul)

Solution (Python):
MOD = 10**9 + 7

W,a,b = map(int,input().split())
if a <= b:
    if a + W < b:
        print(b - a - W)
    else: print(0)
else:
    if b + W < a:
        print(a - b - W)
    else: print(0)

Solution (Python):
w,a,b=map(int,input().split())
if min(a,b)+w>=max(a,b):
    print(0)
    exit()
if b>a:ans=b-(a+w)
else:ans=a-(b+w)
print(ans)

Solution (Python):
def main():
    w, a, b = map(int, input().split())

    rt = max(0, b - a - w, a - b - w)

    
    
    
    
    
    
    

    print(rt)


if __name__ == "__main__":

    main()

Solution (Python):
def main():
    w, a, b = map(int, input().split())

    rt = 0
    if a + w < b:
        rt = abs(a + w - b)
    elif b + w < a:
        rt = abs(b + w - a)
    else:
        rt = 0

    print(rt)


if __name__ == "__main__":

    main()

Solution (Python):
w, a, b = map(int, input().split())
print(max(0, max(a, b) - min(a, b) - w))

Solution (Python):

W,a,b = map(int,input().split())

if b > a+W:

    print (b - (a+W))

elif a > b+W:

    print (a - (b + W))

else:

    print(0)

Solution (Python):

import sys
sys.setrecursionlimit(300000)


def solve(W: int, a: int, b: int):
    ret = max(0, abs(a - b) - W)
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    W = int(next(tokens))  
    a = int(next(tokens))  
    b = int(next(tokens))  
    solve(W, a, b)

if __name__ == '__main__':
    main()

Solution (Python):



W, a, b = map(int, input().split())

if b > a + W:
    print(b - (a + W))
elif a > b + W:
    print(a - (b + W))
else:
    print(0)

Solution (Python):
W, a, b = map(int, input().split(" "))
if a <= b <= a + W or b <= a <= b + W:
    print(0)
else:
    print(min(abs(a + W - b), abs(b + W - a)))

Solution (Python):
W,a,b = map(int,input().split())
start = max(a, b)
end = min(a+W, b+W)
print(max(start-end, 0))

Solution (Python):
W, a, b = map(int, input().split())
if a > b:
    a, b = b, a

print(max(b-(W+a), 0))

Solution (Python):
w, a, b = map(int, input().split())
if a+w < b:
    print(b-a-w)
elif b+w < a:
    print(a-b-w)
else:
    print(0)

Solution (Python):
w, a, b = map(int, input().split())
diff = abs(a - b) - w
print(diff if diff > 0 else 0)

Solution (Python):
W, a, b = map(int, input().split())

if a <= b <= a + W or a <= b + W <= a + W:
    print(0)
elif b + W < a:
    print(a - b - W)
elif b > a + W:
    print(b - a - W)

Solution (Python):
W, a, b = map(int, input().split())

if b > (a+W):
    print(b-(a+W))
elif a > (b+W):
    print(a-(b+W))
else:
    print(0)

Solution (Python):
w,a,b=map(int,input().split())
if a>b:
  a,b=b,a
print(max(b-a-w,0))

Solution (Python):
a = list(map(int,input().split()))
b = [a[1],a[2]]
c = sorted(b)
print(max(c[1]-c[0]-a[0],0))

Solution (Python):
w, a, b = map(int, input().split())
if a < b:
	d = b - (a+w)
	if d < 0:
		print(0)
	else:
		print(d)
else:
	d = a - (b+w)
	if d < 0:
		print(0)
	else:
		print(d)

Solution (Python):
w,a,b=map(int,input().split())
if a+w<b:
    print(b-a-w)
elif a-w<=b<=a+w:
    print(0)
else:
    print(a-b-w)

Solution (Python):
w,a,b = map(int,input().split())
if b>a+w:
    print(b-a-w)
elif a>b+w:
    print(a-b-w)
else:
    print(0)

Solution (Python):
from sys import stdin
W,a,b = [int(x) for x in stdin.readline().rstrip().split()]
dist = abs(a-b)
ans = max(dist-W,0)
print(ans)

Solution (Python):
w, a, b = map(int, input().split())

if a + w < b:
  ans = b - (a + w)
elif a > b + w:
  ans = a - (b + w)
else:
  ans = 0
  
print(ans)

Solution (Python):
W, a, b = map(int, input().split())
if a + W < b:
    print(b - (a + W))
elif b + W < a:
    print(a - (W + b))
else:
    print(0)

Solution (Python):
w,a,b=map(int,input().split())
if a+w < b:
    print(b-(a+w))
elif b+w < a:
    print(a-(b+w))
else:
    print(0)

Solution (Python):
W,a,b = map(int, input().split())
if (b+W)-a<=0:
  print(-((b+W)-a))
elif b-(a+W)<=0:
  print(0)
else:
  print(b-(a+W))

Solution (Python):
W, a, b = map(int, input().split())

if a <= b:
    left, right = a + W, b
else:
    left, right = b + W, a

ans = max(0, right - left)
print(ans)

Solution (Python):
w, a, b = map(int, raw_input().split())
if b+w < a:
    print a - b - w
elif a+w < b:
    print b - a - w
else:
    print 0

Solution (Python):
W, a, b = map(int, input().split())

if(abs(a-b)<W):
    print(0)
elif(abs(a+W-b)>abs(b+W-a)):
    print(abs(b+W-a))
else:
    print(abs(a+W-b))

Solution (Python):
w,a,b = map(int,input().split())
if a+w < b:
  print(b-a-w)
elif b+w < a:
  print(a-b-w)
else:
  print(0)

Solution (Python):
W, a, b = map(int, input().split())
if max(a, b) <= (min(a, b) + W):
    print(0)
else:
    print(max(a, b) - (min(a, b) + W))

Solution (Python):


W,a,b = list(map(int,input().split()))
if a + W < b:
    print(b-a-W)
elif a > b + W:
    print(a - b -W)
else:
    print(0)

Solution (Python):


W,a,b = list(map(int,input().split()))
if a + W < b:
    print(b-a-W)
elif a > b + W:
    print(a - b -W)
else:
    print(0)

Solution (Python):
W,a,b=map(int,input().split())

if b<a:
    a,b=b,a
print(max(b-a-W,0))

Solution (Python):
w,a,b=map(int,input().split())
aa=w+a
bb=w+b
if (b<=aa and a<=bb) or (a<=bb and b<=aa):
    print(0)
else:print(max(b-aa,a-bb))

Solution (Python):
W,a,b=map(int,input().split())
if a<=b:
    if a+W>=b:
        print(0)
    else:
        print(b-a-W)
else:
    if b+W>=a:
        print(0)
    else:
        print(a-b-W)

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

W, a, b = nl()

if (a <= b and b <= a+W) or (b <= a and a <= b+W):
    print(0)
else:
    print(min(abs(a+W - b), abs(a - b - W)))

Solution (Python):
w, a, b = map(int, input().split())
d = abs(a-b)
if(d <= w):
    print(0)
else:
    print(d-w)

Solution (Python):
def abc():
    w, a, b = map(int, input().split())
    if a < b:
        x1 = a
        x2 = b
    else:
        x1 = b
        x2 = a
    if x1 <= x2 <= x1 + w:
        print(0)
        return
    print(x2 - (x1 + w))


abc()

Solution (Python):
W, a, b = map(int, input().split())
print(max(0, b - (a+W), a - (b+W)))

Solution (Python):

W, a, b = map(int, input().split())
if a+W < b:
    print(b - a - W)
elif b+W < a:
    print(a - b - W)
else:
    print(0)

Solution (Python):
W, a, b = map(int, input().split())

if a > b:
    a, b = b, a

print (max(b-(a+W),0))

Solution (Python):
w, a, b = map(int, input().split())
if a <= b :
    if a + w < b :
        print(b - (a + w))
    else :
        print(0)
else :
    if b + w < a :
        print(a - (b + w))
    else :
        print(0)

Solution (Python):
def main():
	W, a, b = map(int, input().split())
	a, b = min(a, b), max(a, b)
	ans = max(0, b-a-W)
	print(ans)


if __name__ == '__main__':
	main()

Solution (Python):
w,a,b=map(int,input().split())
if a+w<b:
	print(b-a-w)
elif a>b+w:
	print(a-b-w)
else:
	print(0)

Solution (Python):
w,a,b=map(int,input().split())
if a<b:
    if a+w>b:
        print(0)
    else:
        print(b-a-w)
else:
    if a<b+w:
        print(0)
    else:
        print(a-b-w)

Solution (Python):
from collections import Counter
from collections import deque
from functools import reduce
from pprint import pprint
import bisect
import copy
import fractions
import itertools
import math
import queue
import random
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def MI(): return map(int, sys.stdin.readline().split())
def II(): return int(sys.stdin.readline())
def IS(): return input()
def C(x): return Counter(x)
def GCD_LIST(numbers): return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers): return reduce(LCM, numbers)
def LCM(m, n): return (m * n // fractions.gcd(m, n))


w, a, b = MI()
if a + w < b:
    print(b - (a + w))
elif b + w < a:
    print(a - (b + w))
else:
    print(0)

Solution (Python):
w,a,b = map(int,input().split())

li = [0, b-(a+w), a-(b+w)]

print(max(li))

Solution (Python):
w, a, b = map(int,input().split())
a1,a2 = a, a+w
b1,b2 = b, b+w
c1 = b1 - a2
c2 = a1 - b2

if c1 < 0 and c2 >= 0:
  print(c2)
elif c2 < 0 and c1 >= 0:
  print(c1)
elif c1 < 0 and c2 < 0:
  print(0)

Solution (Python):
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys
import string

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")















W, A , B = list(map(int, sys.stdin.readline().split()))
a = max(0, max(A, B) - (min(A, B) + W))
print(a)

Solution (Python):
W, a, b = map(int, input().split())
if a > b:
    a, b = b, a
if b - a - W > 0:
    print(b - a - W)
else:
    print(0)

Solution (Python):
w, a, b = map(int, input().split())
x = abs(b-a)
if x > w:
    print(x-w)
else:
    print(0)

Solution (Python):
W,a,b = map(int,input().split())

d = abs(b-a)

answer = max(0,d-W)
print(answer)

Solution (Python):
w, a, b = [int(i) for i in input().split()]
ans = 0
if b > a:
    ans = b - (a + w)
elif a > b:
    ans = a - (b + w)

if ans > 0:
    print(ans)
else:
    print(0)

Solution (Python):
w,a,b=map(int,input().split())
if a+w<b:
    print(abs(a+w-b))
elif b+w<a:
    print(abs(b+w-a))
else:
    print(0)

Solution (Python):
W,a,b=map(int,input().split())

a,b=min(a,b),max(a,b)

print(max(0,b-a-W))

Solution (Python):
W, a, b = [int(i) for i in input().split()]
print(max(0, abs(a - b) - W))

Solution (Python):
W, a, b = [int(i) for i in input().split()]
if b > a + W:
    print(max(0, b - a - W))
else:
    print(max(0, a - b - W))

Solution (Python):
w,a,b = map(int,input().split())
ma = max(a,b)
mi = min(a,b)
print(max(ma-(mi+w),0))

Solution (Python):
w,a,b = (int(x) for x in input().split())

block1 = [a,a+w]
block2 = [b,b+w]

if a > b:
    tmp = block1
    block1 = block2
    block2 = tmp

if block1[0] <= block2[0] <= block1[1]:
    print(0)
else:
    print(block2[0] - block1[1])

Solution (Python):
w, a, b = map(int, input().split())
if a + w < b:
    print(b - a - w)
elif b <= a + w <= b + w:
    print(0)
else:
    print(a - b - w)

Solution (Python):
w,a,b=map(int,input().split())
if a<b:
    print(b-a-w if b-a-w>0 else 0)
else:
    print(a-b-w if a-b-w>0 else 0)

Solution (Python):
w,a,b=list(map(int,input().split()))

desk=[a,b]
desk=sorted(desk)



desk[0]=desk[0]+w

if desk[1]-desk[0]>0:
    print(desk[1]-desk[0])

else:
    print("0")

Solution (Python):


w, a, b = map(int, input().split())

if b+w < a:
    print(a-b-w)
elif b > a+w:
    print(b-a-w)
else:
    print(0)

Solution (Python):
def smaller(x, y):
	if x < y: return x
	return y

W, a, b = map(int, input().split())
if (a<=b and b<=a+W) or (a<=b+W and b+W<=a+W):
	print(0)
else:
	print(smaller(abs(b-a-W), abs(a-b-W)))

Solution (Python):
W, a, b = tuple(map(int, input().split()))
ans = 0
if (a > b):
    ans = a - (b + W)
else:
    ans = b - (a + W)

if (ans >= 0):
    print(ans)
else:
    print(0)

Solution (Python):
W, a, b = map(int, input().split())

if (a + W) < b:
    print(b - (a + W))
elif (b + W) < a:
    print(a - (b + W))
else:
    print(0)

Solution (Python):
w,a,b=map(int,input().split())

if a<b:
    if b-(a+w)<=0:
        print(0)
    else:
        print(b-(a+w))
else:
    if a-(b+w)<=0:
        print(0)
    else:
        print(a-(b+w))

Solution (Python):

l = list(map(int,input().split()))
W = l[0];
a = l[1];
b = l[2];

if(a+W < b):
    print(b-a-W);
elif(b+W < a):
    print(a-b-W);
else:
    print(0);

Solution (Python):
w,a,b = map(int,input().split())

if a<=b<=a+w:
    print(0)
else:
    print(min([abs(b-a-w),abs(b+w-a)]))

Solution (Python):
w,a,b = map(int,input().split())
if a > b :
    if a - (b+w) >= 0 : print("{}".format(a - b - w))
    else : print(0)
else :
    if b - (a+w) >= 0 : print("{}".format(b - a -w))
    else : print(0)

Solution (Python):
w,a,b = map(int,input().split())
print(0 if abs(a-b)<w else abs(a-b)-w)

Solution (Python):
w,a,b = map(int,input().split())
print(0 if b<=a<=(b+w) or a<=b<=(a+w) else max(a,b)-(min(a,b)+w))

Solution (Python):
import sys
input = sys.stdin.readline

w, a, b = map(int, input().split())
if a < b:
    if b-(a+w) < 0:
        ans = 0
    else:
        ans = b-(a+w)
else:
    if a-(b+w) < 0:
        ans = 0
    else:
        ans = a-(b+w)
print(ans)

Solution (Python):
w, a, b = [ int(v) for v in input().split() ]

print(max(abs(a-b) - w, 0))

Solution (Python):
w,a,b=map(int,input().split())
ans=0
if a<b:
  if b-a>w:
    print(b-a-w)
  else:
    print(0)
elif a==b:
  print(0)
else:
  if a-b>w:
    print(a-b-w)
  else:
    print(0)

Solution (Python):
w,a,b = map(int, input().split())
if b>a+w:
    print(b-a-w)
elif a-w<=b<=a+w:
    print(0)
else:
    print(a-b-w)

Solution (Python):
w, a, b = map(int, input().split())
if a + w < b:
    print(b - a - w)
elif b <= a + w <= b + w:
    print(0)
else:
    print(a - b - w)

Solution (Python):
w,a,b = map(int, input().split())
ans = 0
while True:
    if a + w < b:
        ans += 1
        a += 1
    elif b + w < a:
        ans += 1
        b += 1
    else:
        break
print(ans)

Solution (Python):


def solve():
    W, a, b = list(map(int, input().split()))
    
    if a+W <= b:
        ans = b - (a+W)
    elif b+W <= a:
        ans = a- (b+W)
    else:
        ans = 0
    print(ans)


if __name__ == "__main__":
    solve()

Solution (Python):
w,a,b = map(int, input().split())

if a <= b:
    d = b-(a+w)
else:
    d = a-(b+w)

if d <= 0:
    print(0)
else:
    print(d)

Solution (Python):
W, a, b = map(int, input().split())
print(max(0, abs(a - b) - W))

Solution (Python):
W, a, b = map(int, input().split())
if a>b:
    print(max(0, a-b - W))
elif a<b:
    print(max(0, b-a- W))
else:
    print(0)

Solution (Python):
w,a,b = map(int,input().split())
if a<=b:
    if a+w>=b:
        print(0)
    else:
        print(b-a-w)
else:
    if b+w>=a:
        print(0)
    else:
        print(a-b-w)

Solution (Python):
W,a,b = map(int,input().split())
right = b-a-W
left = a-b-W
distant = max(right,left)
print(0 if distant <= 0 else distant)