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

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

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

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

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

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

Solution (Python):


import math
def getInt(): return int(input())
def getIntList(): return [int(x) for x in input().split()]
def getIntFromRows(n): return [int(input()) for i in range(n)]
def getIntMat(n):
    mat = []
    for i in range(n): mat.append(getIntList())
    return mat

def zeros(n): return [0 for i in range(n)]
def zeros2(n, m): return [[0 for i in range(m)] for j in range(n)]
N1097 = 10**9 + 7 

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

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

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

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

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

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

Solution (Python):
int_w, int_a, int_b = map(int, input().split())

if int_a <= (int_b) <= (int_a + int_w) or int_a <= (int_b + int_w) <= (int_a + int_w):
    print(0)
else:
    print(min([abs(a-b) for a in [int_a, int_a + int_w] for b in [int_b, int_b + int_w]]))

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

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

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

Solution (Python):
T = input().rstrip().split(" ")
W = int(T[0])
a = int(T[1])
b = int(T[2])

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

Solution (Python):



def main():
    """Function."""
    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)


if __name__ == "__main__":
    main()

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

Solution (Python):
def main():
    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__':
    main()

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())
ax = [a + x for x in range(w + 1)]
bx = [b + x for x in range(w + 1)]
if a > b:
    print(ax[0] - bx[-1] if ax[0] - bx[-1] >= 0 else 0)
elif a < b:
    print(bx[0] - ax[-1] if bx[0] - ax[-1] >= 0 else 0)
else:
    print(0)

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

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

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

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

Solution (Python):
w,a,b=map(int,input().split())
aw=a+w
bw=b+w
print(['0',b-aw,a-bw][(aw<=b)-(bw<=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, raw_input().split())
if a <= b and b <= a + W:
    print 0
elif a <= b + W and b + W <= a + W:
    print 0
elif b > a + W:
    print abs(b - a - W)
else:
    print abs(a - b -W)

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

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

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

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

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

Solution (Python):
W, A, B = [int(_) for _ in input().split()]
print(max(abs(A-B)-W, 0))

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

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

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

if (mi + w) < ma:
	print(ma - mi - w)
else:
	print(0)

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

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

a_w = a+w
b_w = b+w

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

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

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    W, a, b = li_input()

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

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


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):
w,a,b = map(int, input().split())
aa = min(a,b)
bb = max(a,b)

if aa <= bb <= aa+w:
    ans = 0
else:
    ans = bb - (aa+w)
print(ans)

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

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

Solution (Python):

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

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

Solution (Python):
a = list(map(int,input().split(" ")))
if a[1] < a[2]:
    ans = a[2] - (a[0] + a[1])
else:
    ans = a[1] - (a[0] + a[2])
if ans <= 0:
    print(0)
else:
    print(ans)

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

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

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

Solution (Python):
w, a, b = map(int, input().split())
print([0, abs(a-b) - w][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):
from sys import stdin


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

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

    print(ans)
    return 0


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


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


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


if __name__ == '__main__':
    main()

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

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

print(ass)

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-W-a)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
W, a, b = map(int, input().split())
A = []
A.append([a, a + W])
A.append([b, b + W])
A.sort()
ans = A[1][0] - A[0][1]
if ans < 0:
    ans = 0
print(ans)

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

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

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

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

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

def li(): return [int(x) for x in stdin.readline().split()]
def li_(): return [int(x)-1 for x in stdin.readline().split()]
def lf(): return [float(x) for x in stdin.readline().split()]
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(ns())
def nf(): return float(ns())

w,a,b = li()

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

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

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

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

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

print(dist)

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

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

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

if a <= b <= a + W or b <= a <= b + 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())

d1 = b-a-w
d2 = a-b-w

if d1 <= 0 and d2 <= 0:
    print(0)
elif d1 > 0 and d2 < 0:
    print(d1)
elif d1 < 0 and d2 > 0:
    print(d2)
else:
    print(min(d1, d2))

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


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

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

        


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

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

Solution (Python):
w,a,b = map(int,input().split())
B=[b,b+w]
A=[a,a+w]
ans = 0
if not (A[0] <= B[0] <= A[1] or A[0] <= B[1] <= A[1]):
    ans = max(B[0] - A[1], A[0] - B[1])
print(ans)

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

Solution (Python):

def main():
    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__":
        main()

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

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 = [int(i) for i in 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 = 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 <= b:
    if a + W >= b:
        ans = 0
    else:
        ans = b - a - W
else:
    if b + W >= a:
        ans = 0
    else:
        ans = a - b - W

print(ans)

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):
def main():
    W ,a, b = map(int,input().split(" "))
    if W + a > b and a < b + W:
        print("0")
    elif a < b:
        print(b - (a + W))
    elif a > b:
        print(a - (b + W))
    

if __name__ == '__main__':
    main()

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

Solution (Python):


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

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

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

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

elif a == b:
    print(0)

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

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,raw_input().split())
if (a <= b <= a+W) or (a <= b+W <= a) or (b <= a <= b+W) or (b <= a+W <= b+W) or (a <= b <= b+W <= a+W) or (b <= a <= a+W <= b+W):
  print 0
elif a+W < b:
  print b - (a+W)
else:
  print a - (b+W)

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

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

Solution (Python):
W,*s=map(int,input().split())
a,b=sorted(s)
print((b-a-W)*(a+W<b))

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

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

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

tmp = a+W - b

A = set(range(a,a+W))
B = set(range(b,b+W))

if len(A&B):
    print(0)

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

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

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

if abs(b - a) <= w:
    print('0')
else:
    print('{}'.format(min(abs(b-a-w),abs(a-b-w))))

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

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

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

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

else:
	ans = 0

print(ans)

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

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

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

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

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

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

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

Solution (Python):

W, a, b = map(int, input().split())
l1 = b - (a + W)
l2 = a - (b + W)

if l1 < 0 and l2 < 0:
    print(0)
elif l1 > l2:
    print(l1)
else:
    print(l2)

Solution (Python):
w,a,b = map(int,input().split())
big = max(a,b)
small = min(a,b)

if small+w >= big:
    print(0)
else:
    print(big-(small+w))

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

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

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

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

Solution (Python):
w,a,b = list(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())
sorted_list = sorted([a, b])

if W + sorted_list[0] >= sorted_list[1]:
    print(0)
else:
    print(abs(W + sorted_list[0] - sorted_list[1]))

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