#CCBCHBAHAI0000147. Giá trị lớn nhất (Maximum Value)

Giá trị lớn nhất (Maximum Value)

Maximum Value

Source: C Primer Plus

Version: Phuoc Hung OJ Extended

Problem Statement

Given an integer array A=(a0,a1,…,an−1)A=(a_0,a_1,\ldots,a_{n-1}), find its maximum value:

M=max⁡0≤i<nai.M=\max_{0\le i<n}a_i.

Input

  • The first line contains an integer nn.
  • The second line contains nn integers a0,a1,…,an−1a_0,a_1,\ldots,a_{n-1}.

Output

Print one integer, the maximum value MM.

Subtasks

Subtask 1 (100 points): 1≤n≤1051\le n\le10^5 and −109≤ai≤109-10^9\le a_i\le10^9.

Examples

Input

6
7 -3 5 19 8 19

Output

19

Explanation

The maximum value is 1919. Its multiple occurrences do not change the value that must be printed.