a,b,c=map(int,input().split()) d=max(a,b)-min(a,b) if (d==a or d==b) and c==0: print(0) elif a+c