def main():

    A = [int(i) for i in input().split()]

    A.sort()

    B = [A[2]-A[1], A[2]-A[0]]

    ans = 0

    if B[0] % 2 == B[1] % 2:

        ans = (B[0]+B[1])//2

    else:

        ans = 0--(B[0]+B[1])//2 + 1

    print(ans)





if __name__ == '__main__':

    main()

def main():

    A = [int(i) for i in input().split()]

    A.sort()

    B = [A[2] - A[0], A[2] - A[1]]

    ans = 0

    if B[0] % 2 == B[1] % 2:

        ans = (B[0]+B[1])//2

    else:

        ans = 0--(B[0]+B[1])//2 + 1

    print(ans)





if __name__ == '__main__':

    main()

def main():
    A = [int(i) for i in input().split()]
    A.sort()
    B = [A[2] - A[1], A[2] - A[0]]
    ans = 0
    if B[0] % 2 == B[1] % 2:
        ans = (B[0] + B[1]) // 2
    else:
        ans = 0 - -(B[0] + B[1]) // 2 + 1
    print(ans)


if __name__ == "__main__":
    main()

def main():
    A = [int(i) for i in input().split()]
    A.sort()
    B = [A[2] - A[0], A[2] - A[1]]
    ans = 0
    if B[0] % 2 == B[1] % 2:
        ans = (B[0] + B[1]) // 2
    else:
        ans = 0 - -(B[0] + B[1]) // 2 + 1
    print(ans)


if __name__ == "__main__":
    main()

-    B = [A[2] - A[1], A[2] - A[0]] +    B = [A[2] - A[0], A[2] - A[1]]