Toggle navigation
YouTube
Facebook
Telegram
english
english
українська
Algotester 4.3
Build 496
2024-10-17
Log In
Contact Us
College
Sponsors
Donate
Sources
Python 3
a, b, ab = [int(x) for x in input().split()] x, y = [int(x) for x in input().split()] v1 = min(a, x) x -= v1 v2 = min(b, y) y -= v2 tot = v1 + v2 + min(x + y, ab) res = a + b + ab - tot print(res)