# 저울 - 프로그래머스
def solution(weight):
weight.sort()
s = 0
for i in weight:
if i > s + 1:
return s + 1
else:
s += i
return s + 1
def solution(weight):
weight.sort()
s = 0
for i in weight:
if i > s + 1:
return s + 1
else:
s += i
return s + 1