a,b=input().split(" ") c=input() a=int(a); b=int(b); c=int(c); if(a+b>=c*2): print(a+b-(c*2)) else: print(a+b)