Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Alayna's Adventure Journey

By shajia · Limits 1s, 512 MB

Alayna recently went on her first adventure journey to Dumbulla Safari Park. She enjoyed the bumpy roads and the wild animals, especially the elephants! And now she keeps Saying, “Hati!” .

Elephants tend to live in family groups and Alayna noticed many groups of elephants during her visit .

As her father Shakib was busy with his match practice, he could not join Alayna to her adventure visit. So when Shakib came to know about the elephant groups from Alayna, he wondered about the maximum possible size of such groups.

As there were a huge number of elephant groups she could not remember the maximum group size. But she wrote down the number of elephants in each group in her note book. As she is very busy with her playing, she asked you to help her to find the maximum number of elephants among all groups.

Input

The first line contains a single integer n (1 ≤ n ≤ 1000) — the number of elephant groups.

The second line contains n space-separated integers — the number of elephants in each group. There will be at most 109 elephants in each group.

Output

Print a single number — the maximum number of elephants among all groups.

Sample

InputOutput
1
100
100


Discussion
Statistics

90% Solution Ratio

fsshakkhorEarliest, Mar '17

fsshakkhorFastest, 0.0s

sm_sohagLightest, 0 B

touhidurShortest, 44B

Submit

Login to submit