x,y,z = map(int,input().split()) count=0 for i in range(1,z+1): if i!=x and i!=y: count+=1 print(count)