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