10
-405 -230 252 -393 -390 -259 97 163 81 -129
 3
10000 -10000 10000
 1
-10000
 20
-16 -23 29 44 -40 -50 -41 34 -38 30 -12 28 -44 -49 15 50 -28 38 -2 0

702.333333333333712
 10000.000000000016371
 0.000000000000000
 113.875000000000043

#include <bits/stdc++.h>
using namespace std;
int num[200016];
int n;
double fabs(double x) {
  if (x < 0)
    return -x;
  else
    return x;
}
bool safe(double x) {
  if (x > 0)
    return 1;
  else
    return 0;
}
double ok(double x) {
  int i;
  double ans = 0, now = 0;
  for (i = 0; i < n; i++) {
    if (now == 0) {
      now += num[i] - x;
    } else {
      if (safe(now) == safe(num[i] - x)) {
        now += num[i] - x;
      } else {
        if (fabs(now) > ans) ans = fabs(now);
        now = num[i] - x;
      }
    }
  }
  if (fabs(now) > ans) ans = fabs(now);
  return ans;
}
double find(double l, double r) {
  if (r - l <= 0.0000005)
    return (l + r) / 2.0;
  else {
    double h1 = l + (r - l) / 3.0, h2 = r + (l - r) / 3.0;
    if (ok(h1) > ok(h2))
      return find(h1, r);
    else
      return find(l, h2);
  }
}
int main() {
  double minn = 66666, maxx = -66666;
  double ans = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> num[i];
    if (num[i] > maxx) maxx = num[i];
    if (num[i] < minn) minn = num[i];
  }
  ans = find(minn, maxx);
  printf("%.8f\n", ok(ans));
  return 0;
}
