a, b, c = [int(i) for i in input().split()] print(abs(c - a) + c)