qyliang/CodeNanoFix huggingface dataset:
Buggy code:
W, a, b = map(int, input().split())

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

Fixed code:
W, a, b = map(int, input().split())
if b + W < a:
    ans = a - (b + W)
elif b <= a + W:
    ans = 0
else:
    ans = b - (a + W)
print(ans)
Buggy code:
w,a,b = map(int,input().split())
print(max(min(a,b)-max(a,b)-w,0))

Fixed code:
w,a,b = map(int,input().split())
print(max(max(a,b)-min(a,b)-w,0))
Buggy code:
w, a, b = map(int, input().split())
if a < b:
  print(max(0, a+w-b))
else:
  print(max(0, b+w-a))

Fixed code:
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)
Buggy code:
W,a,b=map(int,input().split())
if (b-a-W>0):
 print (b-a-W)
else:
 print (0)

Fixed code:
W,a,b=map(int,input().split())
if (b-a-W>0):
 print (b-a-W)
elif (a-b-W>0):
 print(a-b-W)
else:
 print (0)
Buggy code:
W, a, b = map(int, input().split())
if a + W < b:
    print(b - (a + W))
elif a - W <= b or b <= a + W:
    print('0')
else:
    print(a - (b + W))

Fixed code:
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)
Buggy code:
W,a,b = map(int,input().split())
A = min(a,b)
B = max(a,b)
print(A,B)
if B-A >= W:
	ans = B-A-W
else:
	ans = 0
print(ans)

Fixed code:
W,a,b = map(int,input().split())
A = min(a,b)
B = max(a,b)

if B-A >= W:
	ans = B-A-W
else:
	ans = 0
print(ans)
Buggy code:
w, a, b = map(int, input().split())
print(max(0, (b - a) - w))

Fixed code:
w, a, b = map(int, input().split())
print(max(0, abs(b - a) - w))
Buggy code:
a,b,c=map(int,input().split())
print(max([b,c])-min([b,c])-a)

Fixed code:
a,b,c=map(int,input().split())
print(max(max([b,c])-min([b,c])-a,0))
Buggy code:
w,a,b = map(int,input().split())
print(max(b-w-a,a-b-w))

Fixed code:
w,a,b = map(int,input().split())
print(max(b-w-a,a-b-w,0))
Buggy code:
W,a,b=map(int,input().split())
print(min(max(W+a - b,0),max(a-W-b)))


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

print(max(max(a, b)-min(a, b)-W, 0))
Buggy code:
w, a, b = map(int, input().split())

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

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


Fixed code:
W, a, b = map(int, input().split())
if (a <= b <= a+W) or (a-W<= b <= a):
    print(0)
elif (a+W) < b:
    print(b - (a+W))
else:
    print(a - (b+W))
Buggy code:
w, a, b = map(int, input().split())
if b > a + w:
    print(b - (a + w))
elif b <= a + w or b >= a- w:
    print(0)
else:
    print(a - (b + w))

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

Fixed code:
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))
Buggy code:
w, a, b = map(int, input().split())

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


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

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

Fixed code:
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)
Buggy code:
w, a, b = map(int, input().split())

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

Fixed code:
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))
Buggy code:
W,a,b = map(int,input().split())

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

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

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

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

Fixed code:
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)
Buggy code:
w,a,b=map(int,input().split())
print(b-(a+w) if b>a else a-(b+w) if b<a else 0)

Fixed code:
w,a,b=map(int,input().split())
print(b-(a+w) if b>a+w else a-(b+w) if b+w<a else 0)
Buggy code:
w,a,b = map(int,input().split())
print(0 if  abs(a-b)-w <= w else abs(a-b)-w)

Fixed code:
w,a,b = map(int,input().split())
print(0 if abs(a-b) <= w else abs(a-b)-w)
Buggy code:
w,a,b = map(int,input().split())
c = min(a,b)
d = max(a,b)
if c + w >= d:
  print(0)
else:
  print(c+w-d)

Fixed code:
w,a,b = map(int,input().split())
c = min(a,b)
d = max(a,b)
if c + w >= d:
  print(0)
else:
  print(d-c-w)
Buggy code:
w,a,b= map(int, input().split())
print(0 if w+a>=b else b-(w+a))

Fixed code:
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)
Buggy code:
w, a, b = map(int,input().split())
if abs(b - a- w) >= abs(a - b):
    print(abs(a-b))
elif a <= b <= a+w:
    print(0)
else:
    print(abs(b - a - w))

Fixed code:
w,a,b = map(int,input().split())
if(b<=a+w and b+w>=a):
    print(0)
elif(a+w<b):
    print(b-a-w)
else:
    print(a-b-w)
Buggy code:
w,a,b=map(int,input().split())
print(max(0,b-a-w))

Fixed code:
w,a,b=map(int,input().split())
print(max(0,max(a,b)-w-min(a,b)))
Buggy code:
W,a,b=map(int,input().split(' '))
print(max(0,b-(a+W)) if a<=b else print(max(0,a-(b+W)))

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

A = a + W

if b - A <= 0:
    print(0)
else:
    print(b-A)


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

A = a + W
if b > a:
    if b - A <= 0:
        print(0)
    else:
        print(b - A)
else:
    B = b + W
    if a - B <= 0:
        print(0)
    else:
        print(a-B)
Buggy code:
w,a,b = map(int,input().split())
max_ = max(a,b)
min_ = min(a,b)
if min_+w == max_:
  print(0)
else:
  s = max_ - (min_+ w)
  print(s)


Fixed code:
w,a,b = map(int,input().split())
max_ = max(a,b)
min_ = min(a,b)
if min_+w >= max_:
  print(0)
else:
  s = max_ - (min_+ w)
  print(s)
Buggy code:
w, a, b = map(int, input().split())

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

Fixed code:
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)
Buggy code:
W, a, b = map(int, input().split())
m = min(a, b)
M = max(a, b)
print(max(M-m-2*W, 0))

Fixed code:
W, a, b = map(int, input().split())
m = min(a, b)
M = max(a, b)
print(max(M-m-W, 0))
Buggy code:
w, a, b = map(int, input().split())
if a + w <= b:
    print(b - (a + w))
elif a <= b <= a + w:
    print(0)
elif a <= b + w <= a + w:
    print(0)
else:
    print(b + w - a)


Fixed code:
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)
Buggy code:
w, a, b = map(int, input().split())

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

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

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

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

Fixed code:
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)
Buggy code:
w, a, b = map(int, input().split())
if a <= b:
    print(b - w + a if b - w + a > 0 else 0)
else :
    print(a - w + b if a - w + a > 0 else 0)

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

else:
  if b+w > a:
    ans = 0
  else:
    ans = a - b+w

print(ans)


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

Fixed code:
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)
Buggy code:
W,a,b =map(int,input().split())
if b-(a+W)<0:
    print(0)
else:
    print(b-(a+W))

Fixed code:
W, a, b = map(int, input().split())
if abs(a - b) <= W:
    print(0)
else:
    print(abs(abs(a - b) - W))
Buggy code:
W,a,b = (int(i) for i in input().split())

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

Fixed code:
W,a,b = (int(i) for i in input().split())


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

Fixed code:
W,a,b=map(int,input().split())
if b>a:
  if b-(a+W)<=0:
  	print(0)
  	exit()
  print(b-(a+W))
else:
  if a-(b+W)<=0:
  	print(0)
  	exit()
  print(a-(b+W))
Buggy code:
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)

Fixed code:
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)
Buggy code:
W,a,b = map(int,input().split())
start = max(a, b)
end = min(a+W, b+W)
print(max(start-end), 0)


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

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

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

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

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

Fixed code:
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)
Buggy code:
W, a, b = map(int, input().split())

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

Fixed code:
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)
Buggy code:
import sys

def main():
    input = sys.stdin.readline
    W, a, b = map(int, input().split())

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


if __name__ == '__main__':
    print(main())


Fixed code:
import sys

def main():
    input = sys.stdin.readline
    W, a, b = map(int, input().split())
    a, b = min(a, b), max(a, b)

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


if __name__ == '__main__':
    print(main())
Buggy code:
from sys import stdin


def main() -> int:
    global W
    W = next_int()
    a, b = map(int, input())

    if b + W < a:
        ans = diff(b + W, a)
    elif a + W < b:
        ans = diff(a + W, b)
    else:
        ans = 0

    print(ans)
    return 0


def diff(a: int, b: int) -> int:
    return abs(a - b)


def next_int() -> int:
    return int(next_str())


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Fixed code:
from sys import stdin


def main() -> int:
    global W
    W = next_int()
    a, b = map(int, input().split())

    if b + W < a:
        ans = diff(b + W, a)
    elif a + W < b:
        ans = diff(a + W, b)
    else:
        ans = 0

    print(ans)
    return 0


def diff(a: int, b: int) -> int:
    return abs(a - b)


def next_int() -> int:
    return int(next_str())


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()
Buggy code:
W, a, b = map(int, input().split())
print(max(min(abs(a - b - W), abs(a - b + W)), 0))

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


Fixed code:
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)
Buggy code:
W,a,b = map(int,input())
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))

Fixed code:
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))
Buggy code:
w,a,b = map(int,input().split())
if b == a+w or a == b+w:
    print(0)
elif b > a+w:
    print(b-(a+w))
elif b+w < a:
    print(a-(b+w))
elif b < a and b+w > a:
    print((b+w)-a)
else:
    print((a+w)-b)
    


Fixed code:
w,a,b = map(int,input().split())
if b > a+w:
    print(b-(a+w))
elif b+w < a:
    print(a-(b+w))
else:
    print(0)
Buggy code:
W,a,b = map(int, input().split())
ans = b - (W+a)
print(ans if ans > 0 else 0)

Fixed code:
W,a,b = map(int, input().split())
if a>b:
  tmp = a
  a = b
  b = tmp
ans = b-(W+a)
print(ans if ans > 0 else 0)
Buggy code:
w, a, b = [int(x) for x in input().split()]


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

print(ans)

Fixed code:
w, a, b = [int(x) for x in input().split()]


if abs(a - b) > w:
    ans = abs(a - b) - w
else:
    ans = 0

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

Fixed code:
W, a, b = map(int, input().split())
if b > a + W:print(b - a - W)
elif b + W < a:print(a-b-W)
else:print(0)
Buggy code:
import sys
w,a,b = map(int, input().split())
if a+w>b or b+w>a:
  print(0)
elif a+w<b:
  print(b-a-w+1)
elif b+w<a:
  print(a-b-w+1)

Fixed code:
import sys
w,a,b = map(int, input().split())
if a+w>=b>=a or b+w>=a>=b:
  print(0)
elif a+w<b:
  print(b-a-w)
elif b+w<a:
  print(a-b-w)
Buggy code:
w, a, b = [ int(v) for v in input().split() ]

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

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

print(max(abs(a-b) - w, 0))
Buggy code:
W,a,b = map(int,input().split())
print(b-(a+W)) if b >= a+W else print(0)

Fixed code:
W,a,b = map(int,input().split())
if a < b:
  print(b-(a+W)) if b > a+W else print(0)
else:
  print(a-(b+W)) if a > b+W else print(0)
Buggy code:
w, a, b = map(int, input().split())
if abs(a-b) <= w:
    print(0)
else:
    print(min(abs(b-a-w), abs(a-b-w))

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

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


Fixed code:
w,a,b=map(int, input().split())
if a>b: print(max(a-w-b,0))
else: print(max(b-w-a,0))
Buggy code:
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
if b<=c:
  if a+b>=c:
    print(0)
  else:
    print(c-b)
else:
  if a+c>=b:
    print(0)
  else:
    print(b-c)

Fixed code:
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
if b<=c:
  if a+b>=c:
    print(0)
  else:
    print(c-b-a)
else:
  if a+c>=b:
    print(0)
  else:
    print(b-c-a)
Buggy code:
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)

Fixed code:
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)
Buggy code:
w,a,b=map(int,input().split())
print(max(0,b-a-w))


Fixed code:
w,a,b=map(int,input().split())
print(max(max(a,b)-min(a,b)-w,0))
Buggy code:
W,a,b = map(int,input().split())
if((abs(b-a) < W):
    print(0)
else:
    ans = abs(b - a) - W
    print(ans)

Fixed code:
W,a,b = map(int,input().split())
if(abs(b-a) < W):
    print(0)
else:
    ans = abs(b - a) - W
    print(ans)
Buggy code:
w,a,b = map(int, input().split())
if a+w<b:
    print(a+w-b)
elif b+w<a:
    print(a-b-w)
else:
    print(0)

Fixed code:
w, a, b = list(map(int, input().split()))
if a+w<b:
  print(b-(a+w))
elif b+w<a:
  print(a-(b+w))
else:
  print(0)
Buggy code:
w,a,b=map(int,input().split())
if a<=b<=(a+w) or b<=(a+w)<=(b+w):
  print(0)
elif (a+w)<b:
  print(b-(a+w))
else:
  print(abs(a-(b+w))

Fixed code:
w, a, b = map(int, input().split())
if a <= b <= a+w or a<= b+w <= a+w:
    print(0)
elif a > b+w:
    print(a - (b+w))
else:
    print(b - (a+w))
Buggy code:
w, a, b = [int(i) for i in input().split()]
if a+w < b:
    print(fabs(b-a-w))
elif b+w < a:
    print(fabs(b-a-w))
else:
    print(0)

Fixed code:
import math
w, a, b = [int(i) for i in input().split()]
if a+w < b:
    print(int(math.fabs(b-a-w)))
elif b+w < a:
    print(int(math.fabs(b+w-a)))
else:
    print(int(0))
Buggy code:
w,a,b = map(int,input().split())
if w+a > b:
  print(0)
else:
	print(b-(a+w))

Fixed code:
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)
Buggy code:
W, a, b = (int(i) for i in input().split())

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

Fixed code:
W, a, b = (int(i) for i in input().split())

if a<b:
    print( max(b-W-a, 0))
else:
    print( max(a-W-b, 0))
Buggy code:
def inpl(): return list(map(int, input().split()))
W, a, b = inpl()
if b-W-a>0:
    print(b-W-a)
else:
    print(0)

Fixed code:
def inpl(): return list(map(int, input().split()))
W, a, b = inpl()
if max(a, b)-W-min(a, b)>0:
    print(max(a, b)-W-min(a, b))
else:
    print(0)
Buggy code:
W,a,b = map(int,input().split())

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

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

if (b < a):
    a, b = b, a

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

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

Fixed code:
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)
Buggy code:
W,A,B = map(int,input().split())
if A <= B:
  a=A
  b=b
else:
  a=B
  b=A
print(b-a-W if a+W<b else int(0))

Fixed code:
W,A,B = map(int,input().split())
if A <= B:
  a=A
  b=B
else:
  a=B
  b=A
print(b-a-W if a+W<b else int(0))
Buggy code:
w,a,b=map(int,input().split())
if a+w<b:
    print(b-a-w)
else:
    print(0)

Fixed code:
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)
Buggy code:
w,a,b=map(int,input().split())
if a>b+w:
    print(a-b-w)
elif a+w>b:
    print(a+w-b)
else:
    print(b-a-w)

Fixed code:
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)
Buggy code:
W,a,b = map(int,input().split())

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


Fixed code:
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)
Buggy code:
W, a, b = map(int, input().split())
print(max(0, max(a, b) - min(a, b)+W))

Fixed code:
W, a, b = map(int, input().split())
print(max(0, max(a, b) - (min(a, b) + W)))
Buggy code:
w,a,b = map(int,input().split())
ma = max(a,b)
mi = min(a,b)
print(max(max-(mi+w),0))

Fixed code:
w,a,b = map(int,input().split())
ma = max(a,b)
mi = min(a,b)
print(max(ma-(mi+w),0))
Buggy code:
W,a,b=map(int,input().split())
thre = a+W
res = 0
if thre >= b:
  res = 0
else:
  res = b-thre
print(res)

Fixed code:
W,a,b=map(int,input().split())
thre =0 
res =0
if a<=b:
  thre = a+W
  if thre >= b:
    res = 0
  else:
    res = b-thre
else:
  thre=b+W
  if thre >= a:
    res = 0
  else:
    res = a-thre
print(res)
Buggy code:
w,a,b= map(int ,input().split())
if w>=a and b<=w+a:
    print(0)
elif a+w<=b
    print(b-(a+w))
elif b+w<a:
    print(a(-b+w))  

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

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

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

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

if min(a,b)+w >=max(a,b):
    print(0)
else:
    print(max(a,b)-(min(a,b)+w))
Buggy code:
W, A, B = map(int, input().split())

if B >= A+W:
  print(abs(A+W-b))
elif B+W <= A:
  print(abs(B+W-A))
else:
  print(0)


Fixed code:
W, A, B = map(int, input().split())

if B >= A+W:
  print(abs(A+W-B))
elif B+W <= A:
  print(abs(B+W-A))
else:
  print(0)
Buggy code:
w,a,b=map(int,input().split())
if a+w>=b and b+w>=a:
    print(0)
elif: a+w>b:
    print(a-b-w)
else:
    print(b-a-w)

Fixed code:
w,a,b=map(int,input().split())
if a+w>=b and b+w>=a:
    print(0)
elif a+w>b:
    print(a-b-w)
else:
    print(b-a-w)
Buggy code:
w,a,b= map(int ,input().split())
if b>=w+a:
    print((w+a)-b)
else:
    print(w-b)

Fixed code:
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)
Buggy code:
w,a,b = map(int,input().split())
print(abs(b-(a+w)) if a+w <= b else 0)

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

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

if a - w <= b <= a + w:
    print(0)
elif a + w < b:
    print(b-(a+w))
else:
    print(a-(b+w))
Buggy code:
W,A,B = map(int,input().split())
if W+A>=B:
	print(0)
else:
	print(B-A-W)

Fixed code:
W,A,B = map(int,input().split())
if W+A>=B:
	if B+W<=A:
		print(A-W-B)
	else:
		print(0)
else:
	print(B-A-W)
Buggy code:
,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))

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

A=min(a,b)

B=max(a,b)

if A+w>B:
  print(B-A-w)
else:
  print(0)

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

A=min(a,b)

B=max(a,b)

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

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

Fixed code:
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)
Buggy code:
W, a, b = map(int, input().split())

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

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

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

if ans>0: print(ans)
else: print(0)
Buggy code:
W,a,b = map(int, input().split())

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

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

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