#CCBCHBA0000017. Giá trị nhỏ nhất của n số (Minimum of N Values)

Giá trị nhỏ nhất của n số (Minimum of N Values)

Minimum of N Values

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given at least one integer, find the minimum. Do not initialize the minimum to zero because every value may be negative.

Input

n in [1,100000] and n integers in [-1000000,1000000].

Output

The minimum integer.

Subtasks

  • Subtask 1 (20%): 1≤n≤51\le n\le5, ∣ai∣≤10|a_i|\le10.
  • Subtask 2 (30%): 1≤n≤1001\le n\le100, ∣ai∣≤1000|a_i|\le1000.
  • Subtask 3 (50%): 1≤n≤1000001\le n\le100000, ∣ai∣≤106|a_i|\le10^6.

Examples

Example 1

Input

4
-8 -3 -5 -4

Output

-8

Explanation

All values are negative and -8 is the minimum.

Example 2

Input

1
7

Output

7

Explanation

A single element is its own minimum.