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, raw_input().split())

l = a
r = b
if a > b:
    r = a
    l = b

diff = r - (l + W)
if diff < 0:
    diff = 0
print diff

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

Solution (Python):
import sys

def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func()
    top_str = input_raw.strip().split()
    [W, a, b] = [int(top_str[0]), int(top_str[1]), int(top_str[2])]
    if a < b:
        rect1_s = a
        rect1_e = a + W
        rect2_s = b
        rect2_e = b + W
    else:
        rect1_s = b
        rect1_e = b + W
        rect2_s = a
        rect2_e = a + W

    print max(0, rect2_s - rect1_e)




if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
line = raw_input().split(" ")
w = int(line[0])
a = int(line[1])
b = int(line[2])

aw = a + w
bw = b + w
if bw < a:
    print a - bw
elif bw >= a and bw <= aw:
    print 0
elif bw > aw:
    if b > aw:
        print b - aw
    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:
    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):
def main():
    w, a, b = map(int, input().split())
    if not (a + w < b or b + w < a):
        print(0)
    else:
        print(min(abs(a + w - b), abs(b + w - a)))


if __name__ == "__main__":
    main()

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

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


if __name__ == "__main__":
    main()

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

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

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

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

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

print(c)

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

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

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