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;
const int maxn = 200200;
int n, a[maxn];
double b[maxn], c[maxn];
double Ans;
double E = (double)1 / (double)10000000000;
double ans(double x) {
  double ret = -100000000, M = 0, m = 0;
  for (int i = 1; i <= n; i++) b[i] = a[i] - x;
  for (int i = 1; i <= n; i++) {
    c[i] = c[i - 1] + b[i];
    ret = max(abs(c[i] - m), ret);
    ret = max(abs(c[i] - M), ret);
    ret = max(abs(c[i]), ret);
    M = max(c[i], M);
    m = min(c[i], m);
  }
  return ret;
}
void ts(double f, double l) {
  if (l - f <= E) {
    Ans = ans((f + l) / 2);
    return;
  }
  double mid1 = (l - f) / 3 + f, mid2 = (l - f) * 2 / 3 + f;
  double c1 = ans(mid1), c2 = ans(mid2);
  if (c1 > c2)
    ts(mid1, l);
  else if (c1 < c2)
    ts(f, mid2);
  else
    ts(mid1, mid2);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  ts(-1010000, 1010000);
  cout << fixed;
  cout << setprecision(12) << Ans << endl;
  return 0;
}
