#include <stdio.h>
#include <stdlib.h>
int mini(int n, double *num)
{
double min = 0.0;
int k,i;
for (i = 0, k = 1; i < n; i++) {
if (num[i] < min) {
min = num[i];
k = i;
}
}
return k;
}
int maxi(int n, double *num)
{
double max = 0.0;
int k, i;
for (i = 0, k = 1; i < n; i++) {
if (num[i] > max) {
max = num[i];
k = i;
}
}
return k;
}
double maxgap(int n, double *num)
{
double minx = num[mini(n, num)];
double maxx = num[maxi(n, num)];
double avg = (maxx - minx) / (n-1);
int *count = malloc((n+1)*sizeof(int));
double *low = malloc((n+1)*sizeof(double));
double *high = malloc((n+1)*sizeof(double));
int i;
for (i = 0; i < n; i++) {
count[i] = 0;
low[i] = maxx;
high[i] = minx;
}
for (i = 0; i < n; i++) {
int bucket = (int)((num[i] - minx)/avg);
count[bucket]++;
if (num[i] < low[bucket]) {
low[bucket] = num[i];
}
if (num[i] > high[bucket]) {
high[bucket] = num[i];
}
}
double tmp = 0, left = high[0];
for (i = 1; i < n-1; i ++) {
if (count[i]) {
double thisgap = low[i] - left;
if (thisgap > tmp) {
tmp = thisgap;
}
left = high[i];
}
}
return tmp;
}
int main()
{
int n, i;
double num[100];
while(scanf("%d", &n) != EOF) {
for (i = 0; i < n; i++) {
scanf("%lf", &num[i]);
}
printf("%.4f\n", maxgap(n, num));
}
}