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().strip().split())
if (b+w)<a:
  print(a-(b+w))
elif b>(a+w):
  print(b-(a+w))
else:
  print(0)

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

Solution (Python):


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

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

if sub - W > 0:
    print(sub - W)
else:
    print(0)

Solution (Python):


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

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

print(ans)

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

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

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())
s=0

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

if s<0:
    print(0)
else:
    print(s)

Solution (Python):
w,a,b = map(int,input().split())
a1 = a+w
b1 = b+w
x = min(a,b)

if x == a:
    ans = b-a1
elif x == b:
    ans = a-b1

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

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

Solution (Python):


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

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

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

Solution (Python):

import sys


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


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

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


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

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

Solution (Python):

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

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

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

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

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

Solution (Python):
import sys
import bisect
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
w,a,b = map(int,readline().split())

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

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

Solution (Python):
w, a, b = map(int,input().split())
a, b = sorted([a, b])
a += w
if a < b:
    print(b-a)
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):
def main():
    width, a, b = map(int, input().split())
    print(0 if a <= b <= a + width else min(abs(b - a - width), abs(a - b - width)))


if __name__ == '__main__':
    main()

Solution (Python):
W, a, b = map(int, input().split())
if (a > b):
    a_left = a
    b_right = b + W
    if (b_right >= a_left):
        print("0")
    else:
        ans = a_left - b_right
        print(ans)
else:
    b_left = b
    a_right = a + W
    
    if (a_right >= b_left):
        print("0")
    else:
        ans = b_left - a_right
        print(ans)

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

Solution (Python):
W,A,B=map(int,input().split())
if 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)

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

d = 0

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

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

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 + 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(0, b - (a + W)))

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

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

Solution (Python):


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

dif = abs(A-B)

A = [A, A+W]
B = [B, B+W]

if dif <= W:
  print(0)
elif min(B) - min(A) > 0:
  print(min(B)-max(A))
else:
  print(min(A)-max(B))

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

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

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

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

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

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

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

a1=abs(l-b)
a2=abs(r-a)
if b<=l:
    if a<=r:
        print(0)
        exit()
ans=min(a1,a2)
print(ans)

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

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

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

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

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

Solution (Python):




def main():
    W, A, B = map(int, input().split())
    if abs(W + A - B) < abs(W + B - A):
        print(max(B - W - A, 0))
    else:
        print(max(A - W - B, 0))


if __name__ == "__main__":
    main()

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    w,a,b=MI()
    if a<=b<=a+w or a<=b+w<=a+w:ans=0
    else:ans=min(abs(a+w-b),abs(b+w-a))
    print(ans)

main()

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

def move(W, A, B):
    if A > B: return move(W, B, A)
    elif B <= A + W: return 0
    else: return B - (A + W)

print(move(w, a, b))

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, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

W, a, b = MAP()
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):
def wab(w,a,b):
    ans = 0
    if w+a >= b and a <= b or a <= b+w and a >= b:
        return ans
    ans = b - (w + a) if a < b else a - (w + b)
    return ans

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

if __name__ == '__main__':
    main()

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

w, a, b = MAP()
left = min(a, b)
right = max(a, b)
if left+w < right:
    print(right - (left+w))
else:
    print(0)

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

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

Solution (Python):
w, a, b = map(int,input().split())
hidari = min(a,b)
migi = max(a,b)
sa = migi - hidari
r = 0

if sa <= w:
  r = 0
else:
  r = sa - w
print(r)

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(W+a-b), abs(W+b-a)))

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

Solution (Python):
"""
author : halo2halo
date : 31, Jan, 2020
"""

import sys
import itertools



read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

W, A, B = map(int, readline().decode('utf8').split())
mi = min(A, B)
ma = max(A + W, B + W)
print(max(0, ma - mi - 2 * W))

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


if a < b:
    a_right = a + W
    width = b - a_right
else:
    b_right = b + W
    width = a - b_right

if width <= 0:
    print("0")
else:
    print(width)

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

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

    

    return W, a, b

def solve(W, a, b):
    a_tail = a + W
    b_tail = b + W

    if a <= b <= a_tail:
        return 0
    elif a <= b_tail <= a_tail:
        return 0
    else:
        return min(abs(b - a_tail), abs(a - b_tail))


if __name__ == '__main__':
    res = solve(*args())
    print(res)

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

Solution (Python):
def main(w, a, b):
    if a <= w and b <= w:
        print(0)
    elif a <= b:
        print(b - (w + a))
    else:
        print(a - (w + b))


if __name__ == "__main__":
    w, a, b = map(int, input().split())

    main(w, a, b)

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

left = min(a, b)
right = max(a+w, b+w)

if right-left <= 2*w:
    ans = 0
else:
    ans = right-left-2*w
print(ans)

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

Solution (Python):
arr = input().split()
arr = list(map(int,arr))
w = arr[0]
a = arr[1]
b = arr[2]

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

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

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

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

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

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

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

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

Solution (Python):
w, a, b = map(int, input().split())
x = [0]*(max(a+w, b+w)+1)

for i in range(a, a+w):
    x[i] += 1

for i in range(b, b+w):
    x[i] += 1

ans = 0
for i in range(min(a,b), max(a+w, b+w)):
    if x[i] == 0:
        ans += 1

print(ans)

Solution (Python):
n,a,b=map(int,input().split())
aw=a+n
bw=b+n
print(min(abs(b-aw), abs(a-bw)) if abs(b - a) >= n else 0)

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

Solution (Python):


def main():
    w, a, b = map(int, input().split())
    x = min(abs(a-b), abs((a+w)-b))
    y = min(abs((b+w)-(a+w)), abs((b+w)-a))
    ans = min(x, y)
    if (a <= b) & (b <= a+w):
        print(0)
    elif (a <= b+w) & (b+w <= a+w):
        print(0)
    else:
        print(ans)
main()

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    w,a,b=INTM()
    if a>=b+w:
        ans=a-(b+w)
    elif b>=a+w:
        ans=b-(a+w)
    else:
        ans=0
        
    print(ans)
if __name__ == '__main__':
    do()

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

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

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

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

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

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(min(abs(b - a + W), abs(a - b + W)))

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

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

Solution (Python):
import sys
input = sys.stdin.readline
W, a, b = [int(x) for x in input().split()]
if a + W < b:
    print(abs(b - (a + W)))
elif b + W < a:
    print(abs(a - (b + W)))
else:
    print(0)

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

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

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

Solution (Python):


import numpy as np
import math


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

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

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

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

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

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

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())
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+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 abs(a-b) < w:
    print(0)
else:
    print(abs(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())
aa=[a,a+w]
bb=[b,b+w]
if aa[1]<bb[0]:
  print(bb[0]-aa[1])
elif bb[1]<aa[0]:
  print(aa[0]-bb[1])
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+w<=a+w or a<=b<=a+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())

if a<=b and a+W >= b:
    print(0)

elif a<b:
    print(b-(a+W))

elif a>=b and b+W >= a:
    print(0)
    exit()

elif a>b:
    print(a-(b+W))

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

if a<=b and a+W >= b:
    print(0)
    exit()

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

if a>=b and b+W >= a:
    print(0)
    exit()

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

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

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

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

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

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

ans = 0

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

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

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

ans = 0

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

print(ans)

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())
a,b = min(a,b), max(a,b)

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

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

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

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

Solution (Python):
from fractions import gcd

from heapq import*
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7



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


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
w,a,b = map(int, sys.stdin.readline().split())

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

Solution (Python):

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf')
ans = 0 ;count = 0 ;pro = 1

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

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

Solution (Python):
import sys

w, a, b = map(int, sys.stdin.readline().split())

def main():
    if a + w < b:
        return b - (a + w)
    elif b + w < a:
        return a - (b + w)
    else:
        return 0

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

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

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

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

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

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

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

a1 = a
a2 = a+w
b1 = b
b2 = b+w

if a1==b1 and a2==b2 :
	print(0)
elif a1<=b2<=a2 :
	print(0)
elif a1<=b1<=a2 :
	print(0)
elif a2 < b1 :
	print(abs(b1 - a2))
elif a1 > b2 :
	print(abs(b2 - a1))

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





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

Solution (Python):
Wab=list(map(int,input().split()))
W=Wab[0]
a=Wab[1]
b=Wab[2]

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

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

aw = a + w
bw = b + w
l = max(aw, bw) - min(a, b) - 2 * w
print(max(l, 0))

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

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

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

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

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

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

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

a1 = a
a2 = a+w
b1 = b
b2 = b+w

if a1==b1 and a2==b2 :
	print(0)
elif a1<=b2<=a2 :
	print(0)
elif a1<=b1<=a2 :
	print(0)
elif a2 < b1 :
	print(abs(b1 - a2))
elif a1 > b2 :
	print(abs(b2 - a1))

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

dist = abs(a - b)

if dist > W:
    print(dist - W)
else:
    print(0)

Solution (Python):
W, a, b = map(int, 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 a < b:
    ans = b - (a + W)
elif a > b:
    ans = a - (b + W)
else:
    ans = 0

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

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

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

Solution (Python):
from sys import stdin

w,a,b = [int(x) for x in stdin.readline().rstrip().split()]

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

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