Vitaly is the mayor of Bertown. He prepares for the new mayor election. As a part of his election campaign, he states that he will make Bertown clean again.
There's not that much time till the election starts, so Vitaly's PR manager Arkady decided to clean only the trash resided in the central street of the city. Namely, there are $$$n$$$ dirty places on the central street, numbered from $$$1$$$ to $$$n$$$ from west to east. Arkady wants to dispose of the trash in the $$$i$$$-th place during the $$$i$$$-th day.
As a true patriot of Bertown and the only person in Vitaly's team who is good in arithmetic, you were asked to calculate the minimal number of people to be involved in the cleaning process. This number is selected once before the process starts and stays the same during all $$$n$$$ days.
After talking to a cleaning expert, you realized that one worker can perform one of three actions during day $$$i$$$:
The street is considered clean if there's no trash in all places at the end of the $$$n$$$-th day. Thus, Arkady has to hire multiple people, so that they can work simultaneously to clean the street.
Help Arkady to calculate the minimal number of people to be involved in the cleaning process.
The first line contains one integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^5$$$) — the number of dirty places in the central street.
The second line contains $$$n$$$ integers $$$t_1, t_2, \dots, t_n$$$ ($$$0 \le t_i \le 2 \cdot 10^5$$$) — the amount of trash in the $$$i$$$-th place, measured in kilograms.
Print one integer — the minimal number of people to be involved in the cleaning process.
3 5 1 2
4
4 8 1 2 7
7
In the first example, Arkady can clean the street by hiring 4 people:
The same thing can't be done by hiring 3 people since otherwise you'll have to move 4 kilograms of trash from place 1, then move 4 kilograms again from place 2 and then face the situation with 6 kilograms of trash in the third and last place, and 3 people cannot dispose of all 6 kilograms.
In the second example, the answer can't be less than 7, since there are 7 kilograms of trash in the last place, and Arkady has to hire at least 7 people to dispose of it.
| Name |
|---|


