budget = 3000
satisfactions = [5, 12, 8, 3, 10]
count = budget // 1000
answer = 0
satisfactions.sort(reverse = True)
for i in satisfactions:
if count <= 0:
break
else:
answer += i
count -= 1
print(answer)
To embed this project on your website, copy the following code and paste it into your website's HTML: