본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 30468번 호반우가 학교에 지각한 이유 1

by 현장 2023. 11. 5.

-Code

line = list(map(int, input().split()))
n = line[-1]
total_stat = sum(line[:-1])
res = n * 4 - total_stat
print(res if res > 0 else 0)