print((eval(input().replace(' ','+1-'))))
print((eval(input().replace(' ','-~-'))))
print((eval(input().replace(" ", "+1-"))))

print((eval(input().replace(" ", "-~-"))))

-print((eval(input().replace(" ", "+1-")))) +print((eval(input().replace(" ", "-~-"))))