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 int64_t maxn = 3e6;
long double a[maxn], pr[maxn];
int64_t n;
long double calc(long double k) {
  long double mx = -1e12, mn = 1e12;
  long double pmx = 0, pmn = 0;
  for (int64_t i = 1; i <= n; i++) {
    long double t = i * k + pr[i];
    pmx = max(pmx, t);
    pmn = min(pmn, t);
    mx = max(mx, t - pmn);
    mn = min(mn, t - pmx);
  }
  return max(fabs(mx), fabs(mn));
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << "I\'m too stupid to solve this problem.\n";
  return 0;
  cin >> n;
  for (int64_t i = 0; i < n; i++) cin >> a[i];
  pr[0] = 0;
  for (int64_t i = 1; i <= n; i++) pr[i] = pr[i - 1] + a[i - 1];
  long double l = -1e8, r = 1e8;
  long double eps = 1e-12;
  while (fabs(calc(r) - calc(l)) > eps) {
    long double m1 = l + (r - l) / 3, m2 = r - (r - l) / 3;
    if (calc(m1) < calc(m2))
      r = m2;
    else
      l = m1;
  }
  cout << fixed << setprecision(12) << calc(l) << "\n";
  return 0;
}
