The amount of money borrowed by four people is as follows: A borrows $10 from B; B borrows $20 from C; C borrows $30 from D; D borrows $40 from A. It happened that all four of them were present and decided to settle the bill. How much is the minimum amount of US dollars needed to pay off all the debts in one lump sum?
有四个人借钱的数目分别是这样的：A向B借了10美元；B向C借了20美元；C向D借了30美元；D又向A借了40美元．碰巧四个人都在场，决定结个账，请问最少只需要动用多少美金就可以将所有欠款一次付清？
<gadget id="calculator">10 + 10 + 10</gadget>
<output>30</output>

<result>30</result>