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 IN() {
  int c, f, x;
  while (!isdigit(c = getchar()) && c != '-')
    ;
  c == '-' ? (f = 1, x = 0) : (f = 0, x = c - '0');
  while (isdigit(c = getchar())) x = (x << 1) + (x << 3) + c - '0';
  return !f ? x : -x;
}
const int N = 200000 + 19;
int A[N], n;
double B[N], l, r, res, tmp;
double calc(double x) {
  res = 0;
  for (int i = 1; i < n + 1; i++) B[i] = A[i] - x;
  tmp = 0;
  for (int i = 1; i < n + 1; i++) {
    tmp = max(tmp, 0.0) + B[i];
    res = max(res, abs(tmp));
  }
  tmp = 0;
  for (int i = 1; i < n + 1; i++) {
    tmp = min(tmp, 0.0) + B[i];
    res = max(res, abs(tmp));
  }
  return res;
}
int main() {
  n = IN();
  for (int i = 1; i < n + 1; i++) A[i] = IN();
  l = -10000, r = 10000;
  for (int i = 0; i < 100; i++) {
    double t = (r - l) / 3.0;
    double t1 = l + t, t2 = r - t;
    if (calc(t1) > calc(t2))
      l = t1;
    else
      r = t2;
  }
  printf("%.10lf\n", calc(l));
}
