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 = [int(i) for i in input().split()]

c = abs(b - (a+w))
d = abs(a-(b+w))

if a + w > b and  b + w > a:
    print(0)
else:
    print(min(c,d))

Solution (Python):
w, *ab = [int(i) for i in input().split()]
a, b = sorted(ab)
if a + w < b:
  print(b - (a + w))
else:
  print(0)

Solution (Python):


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

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

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    W,a,b = MI()
    if (b-(a+W)) * ((b+W)-a) < 0:
        print(0)
    else:
        print(min(abs(a+W-b), abs(b+W-a)))
if __name__ == '__main__':
    main()

Solution (Python):
W,a,b = map(int, input().split())
a1 = a
a2 = a+W
b1 = b
b2 = b+W
if b1 <= a <= b2 or b1 <= a2 <= b2:
  print(0)
else:
  if a2 < b1:
    print(b1 - a2)
  else:
    print(a1 - b2)

Solution (Python):
w,a,b = map(int,input().split())
al = a
ar = a+w
bl = b
br = b+w

if al <= bl <= ar or al <= br <= ar:
	print(0)
else:
	print(min(abs(ar-bl),abs(br-al)))

Solution (Python):
w,a,b = map(int, input().split())
ans = 0
if a <= b:
  ans = max(b-a-w,0)
else:
  ans = max(a-b-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())
A = [a,a+W]
B = [b,b+W]
if A[0] <= B[0] <= A[1] or A[0] <= B[1] <= A[1] or B[0] <= A[0] <= B[1] or B[0] <= A[1] <= B[1]:
    print(0)
    exit()
print(max(B[0]-A[1],A[0]-B[1]))

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(abs(b-a) < W):
    print(0)
else:
    ans = abs(b - a) - W
    print(ans)

Solution (Python):
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))

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

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<=b<=a+w or b<=a<=b+w:
    print(0)
else:
    print(b-a-w if b>=a else a-b-w)

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

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

Solution (Python):
import sys
from functools import reduce
import copy
import math
from pprint import pprint
import collections
import bisect


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    [W, a_left, b_left] = string_to_int(inputs[0])
    a_right = a_left + W
    b_right = b_left + W

    if a_right < b_left:
        return b_left - a_right
    elif a_left > b_right:
        return a_left - b_right
    return 0


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

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

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

d = abs(a-b)
ans = max(0, d-W)

print(ans)

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

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

print(max(0, ans))

Solution (Python):

W, p, q = map(int,input().split())
a = min(p,q)
b = max(p,q)
d = 0

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

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

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

aa = a + W
bb = b + W

if aa < b:
  print(b - aa)
elif bb < a:
  print(a - bb)
elif a < b:
  print(0)
else:
  print(0)

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

Solution (Python):
w,a,b=map(int,input().split())
if abs(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())

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())

ans = max(0, b - (a + w), a - (b + w))

print(ans)

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

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

Solution (Python):
def examB():
    W, a, b =LI()
    ans = max(max(a,b)-(min(a,b)+W),0)
    print(ans)

import sys
import copy
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

Solution (Python):

w, a, b = [int(s) for s in input().split()]

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

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

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())
ans = abs(a - b) - w
print(ans if ans > 0 else 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:
    print(max(0,b-(a+w)))
else:
    print(max(0,a-(b+w)))

Solution (Python):
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))

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

w,a,b = inpl()
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 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())
big, small = max(a, b), min(a, b)
if big == small or (big - small) + 1 == W:
    print(0)
else:
    print(big - (small + W))

Solution (Python):



w, a, b = map(int, open(0).read().split())

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

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

Solution (Python):
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)

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())
a_tail = a + w
b_tail = b + w

if (a >= b and a <= b_tail) or (a_tail >= b and a_tail <= b_tail):
    ans = 0
else:
    ans = min(abs(a + w -b), abs(b + w - a))

print(ans)

Solution (Python):
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)

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 >= a):
	wb = b
	wa = a + w
	if(wa >= wb ):
		print (0)
	else:
		print (wb - wa)
else:
	wa = a
	wb = b + w
	if(wb >= wa ):
		print (0)
	else:
		print (wa - wb)

Solution (Python):
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)

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

Solution (Python):
f=lambda x:max(abs(x[2]-x[1])-x[0],0)
print(f(list(map(int,input().split()))))

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

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

Solution (Python):
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)

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

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

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

Solution (Python):

si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

W,a,b = nl()

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

print(ans)

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 a + W < b:
    print(b - (a + W))

Solution (Python):

W, a, b = map(int, input().split())
print(max(0, max(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<= a+W<=b+2*W:
    print(0)
else:
    print(a-b-W)

Solution (Python):
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)

Solution (Python):
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)

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

if b > a:
  print(max(b - (a+W), 0))
else:
  print(max(a - (b+W), 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(b-w-a,a-b-w,0))

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7

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

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())
print(max(0, abs(a - b) - W))

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

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<=a+w or a<=b+w<=a+w:
    print(0)
else:
    print(b-(a+w) if a+w<b else a-(b+w))

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    w, a, b = list(map(int, input().rstrip('\n').split()))
    if a + w < b:
        print(abs(a + w - b))
    elif b + w < a:
        print(abs(b + w - a))
    else:
        print(0)


if __name__ == '__main__':
    slove()

Solution (Python):

w,a,b=map(int,input().split())
ar=a+w 
br=b+w 
if a<=b<ar or a<=br<=ar:
    print(0)
else: 
    a1=abs(br-a)
    a2=abs(ar-b)
    print(min(a1,a2))

Solution (Python):
w,a,b = map(int,input().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:
    m = b-a-W
else:
    m = a-b-W

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

Solution (Python):
W, a, b = list(map(int,input().split()))
if b>a+W: print(b-(a+W))
elif b+W<a: 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 = map(int, input().split())

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

print(ans)

Solution (Python):
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)

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 <= a+w or a<= b+w <= a+w:
    print(0)
elif a > b+w:
    print(a - (b+w))
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>=A:
    A,B=B,A
print(max(0,A-(W+B)))

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 min(a, b)+w > max(a, b):
  print(0)
else:
  print(max(a, b)-(min(a, b)+w))

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

Solution (Python):
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))

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())
if a <= b <= a+w or a<= b+w <= a+w:
  print(0)
else:
  print(min(abs(a+w-b),abs(b+w-a)))

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())

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+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<=a+W or b<=a<=b+W:
  print("0")
else:
  mina=a
  maxa=a+W
  minb=b
  maxb=b+W
  print(abs(min(abs(mina-minb),abs(mina-maxb),abs(maxa-minb),abs(maxa-maxb))))

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())
ans = abs(a - b) - w
if ans < 0:
    print(0)
else:
    print(ans)

Solution (Python):
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))

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

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

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

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(a - b), abs(a + W - b), abs(a - b - W), abs(a + W - 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 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 + 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())
print(max(b-(a+w), a-(b+w)) if max(b-(a+w), a-(b+w)) >= 0 else 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())
aw = a + w
bw = b + w
if a == b:
    print(0)
elif b < aw:
    if bw < a:
        print(a - bw)
    else:
        print(0)
elif a < bw:
    if aw < b:
        print(b - aw)
    else:
        print(0)

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

Solution (Python):
W,a,b = map(int,input().split())
if a <= b <= a+W or a <= b <= 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(abs(a-b)-w, 0))

Solution (Python):

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)

Solution (Python):
w,a,b = map(int,input().split())
s = {int(i) for i in range(a,a+w+1)} & {int(i) for i in range(b,b+w+1)}
if s:
    print(0)
else:
    if a+w < b:
        print(b-a-w)
    elif b+w < a:
        print(a-b-w)

Solution (Python):
W, *N = [int(n) for n in input().split()]
N.sort()
print(max(0, N[1] - W - N[0]))

Solution (Python):
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)

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

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:
    print(min([abs(a - b), abs(a - b - w), abs(a + w - b)]))

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

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

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

if wa < b:
    print(abs(b-wa))
elif wb < a:
    print(abs(a-wb))
else:
    print(0)

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())
if b > a:
    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):
def resolve():
    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")


if __name__ == "__main__":
    resolve()

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

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

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

Solution (Python):

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

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 <= 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):
import sys
input = sys.stdin.readline

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

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

if __name__ == "__main__":
    main()

Solution (Python):
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)

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

Solution (Python):
w,a,b=map(int,input().split());c,d=b-a-w,a-b-w;print((0,max(c,d))[c*d<0])

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

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=(int(i) for i in input().split())

if a > b:
    x = a
    a = b
    b = x

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

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):
wide, a, b = map(int, input().split())
if b + wide < a:
  ans = a - (b + wide)
elif b > a + wide:
  ans = b - (a + wide)
else:
  ans = 0
print(ans)

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 = list(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))
else:
    print(0)

Solution (Python):
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)

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

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

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

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

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


if b>a:
    if b>a+W:
        print(b-a-W)
    else:
        print(0)
else:
    if a>b+W:
        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)
else:
    print(0)

Solution (Python):
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)

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())
print(max(0,abs(a-b)-w))

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(b+w-a)))

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

if a <= b <= (a+W) or a <= (b+W) <= (a+W):
  print(0)
elif b > (a+W):
  print(b-(a+W))
elif a > b + W:
  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 abs(B - A) <= W:
    print(0)
else:
    print(min(abs(B - A - W), abs(A - B - W)))

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

tmp = max(a, b) - min(a + w, b + w)

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

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

Solution (Python):

import sys


def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

W, A, B = ISI()
if abs(A-B) > W:
    print(abs(A-B)-W)
else:
    print(0)

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

Solution (Python):
import sys
import copy
import string
import  math
from _bisect import *
from collections import *
from operator import itemgetter
from math import factorial
"""
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

w, a, b = na()
if b <= a + w <= b + w or b <= a <= b + 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(0,abs(b-a)-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)))
else:
    print(0)

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

elif a>b+w:
  ans=a-(b+w)

print(ans)

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 b <= a+w <= b+w:
    print(0)
elif a < b:
    print(b-a-w)
else:
    print(a-b-w)

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())
if b-a-w>=0: print(b-a-w)
elif a-b-w>=0: print(a-b-w)
else: print(0)

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


if __name__ == "__main__":
    test()

Solution (Python):



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


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


print(ans)

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

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

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())
print([0,max(a,b)-min(a,b)-w][max(a,b)-min(a,b)-w>0])

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

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

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

if __name__ == '__main__':
    print(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 abs(a - b) <= w:
    print(0)
else:
    print(abs(a - b) - w)

Solution (Python):
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


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

if __name__ == '__main__':
    main()

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())
m = min(a, b)
M = max(a, b)
print(max(M-m-W, 0))

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

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

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)

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

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 = map(int,input().split())

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

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

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())
s=abs(a-b)
print(s-w if s>w else 0)