输入样例 1
2 1 1 1
输出样例 1
4
输入样例 2
4 100 3 4 5 4
输出样例 2
5
In following homework:
二分进阶训练题单
Using your YCKC Online Judge universal account