x, y, z = [int(i) for i in input().split()] ans = 0 for i in range(1, z+1): if not(i==x or i==y): ans+=1 print(ans)