A gauge logs n distinct meter readings that were originally listed in strictly increasing order, then the list was cyclically rotated by some unknown amount (possibly zero). Recover and report the single smallest reading.
Input format
Line 1: an integer n.
Line 2: n space-separated integers: a rotation of a strictly increasing sequence (all values distinct).
Output format
A single integer: the minimum reading.
Constraints
- 1 ≤ n ≤ 100000
- All values are distinct.
- The array is a cyclic rotation of a strictly increasing sequence.
- -1000000000 ≤ each reading ≤ 1000000000