X,Y,Z = list(map(int,input().split())) count = 0 if X <= Z:count += 1 if Y <= Z:count += 1 print(Z-count)