# Highest Hill

## 문제

Sweden may not have a particularly impressive mountain range compared to other NCPC countries such as Norway and Iceland, but at least it beats the flatlands of Denmark. The situation is not so clear when comparing other member countries though. For example, is Estonia more mountainous than Lithuania? To settle this question, you want to determine which of the two countries has the most impressive mountain peak.

A mountain range is defined by sampling the heights hi of n equidistant points. Within a mountain range, we call a triple of indices 1≤i<j<k≤n a peak if hi≤⋯≤hj≥⋯≥hk. The height of a peak is defined as the smaller of hj−hi and hj−hk.

Given a mountain range, can you find the height of its highest peak?

## 입력

The first line contains a single integer N (3≤n≤200 000), the number of sampled points of the mountain range.

The second and final line contains the heights h 1,…,hN (0≤hi≤318·109) of the sampled points, in nanometers above sea level.

It is guaranteed that the mountain range contains at least one peak.

## 출력

Output a single integer: the height of the highest peak.

## 예제 입력 1 복사

    11
    0 1 2 3 4 5 4 3 2 1 0

## 예제 입력 2 복사

    10
    29 85 88 12 52 37 19 86 7 44

## 예제 입력 3 복사

    3
    2147483647 318000000000 2147483647

## 예제 입력 4 복사

    3
    1 1 1

## 예제 출력 1 복사

    5

## 예제 출력 2 복사

    67

## 예제 출력 3 복사

    315852516353

## 예제 출력 4 복사

    0