X,Y,Z=map(int,input().split()) A=[X,Y] A=list(set(A)) ANS=Z for a in A: if a<=Z: ANS-=1 print(ANS)