X, Y, Z = [int(i) for i in input().split()] ans = 0 for i in range(Z): if i+1 == X or i+1 == Y: continue ans = ans + 1 print(ans)