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>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
const int maxn = 200005;
const double eps = 0.0000001;
int a[maxn], n;
double fun(double x) {
  double temp = 0, max = 0, temp2;
  for (int i = 1; i <= n; i++) {
    if (temp > 0 && a[i] - x < 0) {
      temp = a[i] - x;
      temp2 = abs(temp);
      if (temp2 > max) max = temp2;
    } else if (temp < 0 && a[i] - x > 0) {
      temp = a[i] - x;
      temp2 = abs(temp);
      if (temp2 > max) max = temp2;
    } else {
      temp += a[i] - x;
      temp2 = abs(temp);
      if (temp2 > max) max = temp2;
    }
  }
  return max;
}
double findmin(double a, double b) {
  if (b - a < eps) return a;
  double mid = (a + b) / 2;
  double mid1, mid2, next1, next2;
  mid1 = (a + mid) / 2;
  mid2 = (b + mid) / 2;
  if ((fun(a) > fun(mid1)) && (fun(mid1) > fun(mid)))
    next1 = mid1;
  else
    next1 = a;
  if ((fun(b) > fun(mid2)) && (fun(mid2) > fun(mid)))
    next2 = mid2;
  else
    next2 = b;
  return findmin(next1, next2);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  cout << setprecision(30) << fun(findmin(-10000, 10000));
  return 0;
}
