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