A,B,C=map(int,input().split()) print(B-max(A,C))