x, y, z = map(int, input().split())
cnt = 0
for i in range(1, z+1):
    if i == x or i == y:
        continue
    cnt += 1
print(cnt)