def solve(A, B, C): if B == max([A, B, C]): print(B - max(A, C)) else: print(0)