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 long long MOD = 1e9 + 7;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
const long long MAXN = 100005;
long long n, t, c, s;
long double a[MAXN];
long double can(long double m) {
  long double k = 0, maxi = 0;
  for (long long i = 0; i < n; i++) {
    k += (a[i] - m);
    if (abs(k) + 1e-9 > maxi) maxi = abs(k);
    if (k < 1e-9) k = 0;
  }
  k = 0;
  for (long long i = 0; i < n; i++) {
    k += (-a[i] + m);
    if (abs(k) + 1e-9 > maxi) maxi = abs(k);
    if (k < 1e-9) k = 0;
  }
  return maxi;
}
int main() {
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  long double l = 0, r = 1e4 + 1;
  while (r - l > 1e-9) {
    long double m1 = l + ((r - l) / 3);
    long double m2 = r - ((r - l) / 3);
    if (can(m2) < can(m1) + 1e-9)
      l = m1;
    else
      r = m2;
  }
  cout << setprecision(15) << can(r);
  return 0;
}
