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;
bool compare(int a, int b) { return a > b; }
class Compare {
 public:
  bool operator()(int a, int b) { return a > b; }
};
int mod(int a, int b) { return ((a % b) + b) % b; }
int n, a[200009];
double f(double x) {
  double g_mx = -100000000000, l_mx = 0, l_mn = 0;
  for (int i = 0; i < n; i++) {
    double q = a[i] - x, p1 = l_mx + q, p2 = l_mn + q;
    l_mx = max(q, p1), l_mn = min(q, p2);
    g_mx = max(g_mx, max(fabs(l_mn), fabs(l_mx)));
  }
  return g_mx;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  double l = -100000.0, r = 100000.0, m1, m2;
  for (int i = 0; i < 250; i++) {
    m1 = l + (r - l) / 3.0;
    m2 = r - (r - l) / 3.0;
    if (f(m1) > f(m2))
      l = m1;
    else
      r = m2;
  }
  printf("%.12lf\n", f(m1));
  return 0;
}
