At the start of the First Open Cup of Oleksandriia, the organizers decided to host a lottery! The key component of this lottery is barrels, each marked with a unique integer A_i, placed inside a bag. The numbers on these barrels are all distinct.
There are N - 1 participants in the Cup. Each participant, in turn, approaches the organizers and draws two barrels from the bag. From these two barrels, the participant keeps the one with the larger number, while the other is returned to the bag. Naturally, after all participants have made their selections, exactly one barrel will remain in the bag.
At the conclusion of the event, there will be a celebratory candy distribution. Each participant receives candies equivalent to the number on the barrel they retained.
The organizers are tasked with determining the maximum number of candies that might be required for the lottery. Your job is to assist them in calculating the maximum possible number of candies that all participants can collectively receive.
The first line contains a single integer — the number of barrels (2 \leq N \leq 100). The second line lists distinct integers A_i (1 \leq A_i \leq 32767), separated by spaces.
Output a single integer — the maximum possible number of candies that all participants can receive.
Example 1