#CCBCHBAHAI0000146. Giá trị nhỏ nhất (Minimum Value)

Giá trị nhỏ nhất (Minimum Value)

Minimum Value

Source: Phước Hưng OJ

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 minimum value:

m=min⁡0≤i<nai.m=\min_{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 minimum 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 -10 8 -2

Output

-10

Explanation

The smallest value among 7,−3,5,−10,8,−27,-3,5,-10,8,-2 is −10-10, so the program prints -10.