Maximum in Unimodal Sequence
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Sequence is called unimodal if there exists such index that and . Value is maximum in this sequence. You must find this value.
Input
The first line contains the size of array . The next line contains positive integers that represent a unimodal sequence. Numbers in array do not exceed .
Output
Print the maximum element is the unimodal sequence.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 641
Acceptance rate 73%