聪明的，她们会采用最好的办法让自己取到的金币最多。请帮助贝</span><span style="font-size: medium">西计算一下，她能拿到多少钱？</span></div></div></div></div></div><div class="row"><div class="column"><h4 class="ui top attached block header">输入格式</h4><div class="ui bottom attached segment font-content"><div style="position: relative; overflow: hidden;"><div class=content><p>* Line 1: A single integer: N * Lines 2..N+1: Line i+1 contains a single integer: C_i<