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

if a <= b:
    while True:
        if a + W + count >= b:
            print(count)
            break
        else:
            count += 1

if a > b:
    while True:
        if a <= b + W + count:
            print(count)
            break
        else:
            count += 1

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

Solution (Python):

"""
B - NarrowRectanglesEasy
https://atcoder.jp/contests/abc056/tasks/abc056_b

"""
import sys


def solve(W, a, b):
    if a > b:
        a, b, = b, a
    return max(0, b-(a+W))


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


if __name__ == '__main__':
    main(sys.argv[1:])

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

Solution (Python):
def solve(W, a, b):
    if a > b:
        a, b = b, a
    print(max(0, b - (a + W)))





W, a, b = [int(x) for x in input().split()]
solve(W, a, b)

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

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

Solution (Python):
from sys import exit, stdin
W, a, b = [int(_) for _ in stdin.readline().rstrip().split()]
if abs(a-b) <= W:
    print(0)
else:
    print(abs(a-b)-W)

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

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

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

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

w, *arr = map(int, input().split())
arr.sort()
diff = arr[1] - (arr[0]+w)
print(diff if diff >= 1 else 0)

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math

mod = 10**9+7


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

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

print(ans)

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

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

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

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

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

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

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

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

Solution (Python):
l = list(map(int, input().split()))
longer = max(l[1], l[2])
shorter = min(l[1], l[2])
if longer - shorter-l[0] < 0:
    print(0)
else:
    print(longer - shorter-l[0])

Solution (Python):
w, a , b = [int(i) for i in 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

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

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

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

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

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

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

Solution (Python):
W,a,b = [int(x) for x in input().split()]
dist = abs(a-b)-W
if(dist<=0):
  print(0)
else:
  print(dist)

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

Solution (Python):
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

W,a,b = inpl()
al,ar = a,a+W
bl,br = b,b+W

if ar < bl:
    print(bl-ar)
elif br < al:
    print(al-br)
else:
    print(0)

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

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


elif b==a:
  print(0)


else:

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

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

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

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

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

w, a, b = list(map(int, input().rstrip().split()))
print(0 if max(a, b) - min(a, b) - w <= 0 else max(a, b) - min(a, b) - w)

Solution (Python):



w,a,b=map(int, input().split())
print(max(max([a,b])-(min([a,b])+w),0))

Solution (Python):
import sys
from collections import Counter

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

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

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

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

Solution (Python):


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

    return (a, a + w), (b, b + w)

def submit():
    a, b = read_input()

    if a[0] < b[0]:
        print(max(b[0] - a[1], 0))
    else:
        print(max(a[0] - b[1], 0))


if __name__ == '__main__':
    submit()

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

tate = 0
if  b - (a + W) >= 0:
    tate += b - (a+ W)
elif a - (b + W) >= 0:
    tate += a - (b + W)

print(tate)

Solution (Python):


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

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

if a1<=b1:
    z=b1-a2
elif b1<=a1:
    z=a-b2

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

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

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

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

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

Solution (Python):
[W,a,b] = list(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 b + W < a:
    ans = a - (b+W)
elif a <= b+W <= a+W or a <= b <= a+W:
    ans = 0
else:
    ans = b - (a + W)

print(ans)

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

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

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

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

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

Solution (Python):

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

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    w,a,b = f()
    if a>b:
        a,b = b,a
    aw = a+w
    if aw < b:
        print(b - aw ) 
    else:
        print(0)

solve()

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

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

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

Solution (Python):


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

a1=a+w
b1=b+w

if a<= b <= a+w or a<= b1 <= a+w:
    print(0)
else:
    x1=abs(b-a)
    x2=abs(b-a1)
    x3=abs(b1-a)
    x4=abs(b1-a1)
    print(min(x1,x2,x3,x4))

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

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

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

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    W,a,b = (int(_) for _ in input().split())
    if(a>b):
        tmp = a
        a = b
        b = tmp
        
    if b-(a+W) <= 0:
        ans = 0
    else:
        ans = b-(a+W)
    print(ans)
    
if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

print(ans)

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

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

print(ans)

Solution (Python):
def narrow_rectangles_easy(W: int, a: int, b: int) -> int:
    if a + W < b:
        return b - (a + W)
    if b + W < a:
        return a - (b + W)
    return 0


if __name__ == "__main__":
    W, a, b = map(int, input().split())
    ans = narrow_rectangles_easy(W, a, b)
    print(ans)

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

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

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

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

Solution (Python):

from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007


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


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

"""

x = I()
a = 0
i = 1
while a < x:
    a += i
    i += 1
print(i-1)
"""


"""
n,k = LI()
a = LI(n)
"""

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

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

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

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


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

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

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

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

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

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

diff = a - b
delta = abs(diff) - W
if delta <= 0:
    print(0)
else:
    print(delta)

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

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

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

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

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

mini = 0

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

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

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

ans = max((max(A, B) - (min(A, B) + W)), 0)
print(ans)

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


if __name__ == "__main__":
    main()

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

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

Solution (Python):
W, a, b = [ int(x) for x in 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):
W,a,b=map(int,input().split())
print(max(0,b-(a+W),a-(b+W)))

Solution (Python):

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

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

if A+W < B:
    print(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)
elif a + w < b:
    print(b - (a + w))
else:
    print(a - (b + w))

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

print(res)

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

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

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

Solution (Python):
w,a,b=[int(i) for i in 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:
    if a + w > b:
        print(0)
    else:
        print(abs(a+w-b))
else:
    if b + w > a:
        print(0)
    else:
        print(abs(b+w-a))

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

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

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy

def j(q):
    if q==1: print("YES")
    else:print("NO")
    exit(0)


def ct(x,y):
    if (x>y):print("GREATER")
    elif (x<y): print("LESS")
    else: print("EQUAL")

def ip():
    return int(input())




w,a,b = (int(i) for i in input().split())    










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

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

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

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

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

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

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

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

print(ans)

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

Solution (Python):
W, a, b = [int(x) for x in 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+W < b:
    result = b-(a+W)
elif a > b+W:
    result = a-(b+W)
else:
    result = 0

print(result)

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

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

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

Solution (Python):
a=list(map(int,input().split()))
x=max(a)
a.remove(x)
print(x-sum(a) if x-sum(a)>0 else 0)

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

apos = [a, a + W]
bpos = [b, b + W]

secis_left = False if bpos[1] > apos[1] else True
if bpos[0] - apos[1] <= 0 and not secis_left:
    print(0)
    exit(0)
elif apos[0] - bpos[1] <= 0 and secis_left:
    print(0)
    exit(0)

dist = [abs(apos[0] - bpos[1]), abs(bpos[0] - apos[1])]

print(min(dist))

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

Solution (Python):
w,a,b=(int(i) for i in 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())
ans = 0
if b > a:
    if a + w < b:
        ans = b - (a + w)
else:
    if b + w <= a:
        ans = a - (b + w)

print(ans)

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

print(ans)

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

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

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

if B-A >= W:
	ans = B-A-W
else:
	ans = 0
print(ans)

Solution (Python):
[W,a,b] = [int(x) for x in 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 a <= b <= a + w:
    print(0)
else:
    print(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 = [int(_) for _ in input().split()]

print(max(abs(A - B) - W, 0))