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>
long long a[200000];
long long ans;
int n;
long long cal(long long x) {
  long long s = 0;
  long long re = 0;
  long long temp;
  for (int i = 0; i < n; i++) {
    temp = a[i] - x;
    if (temp + s < 0) {
      s += temp;
      if (s + re < 0) re = -s;
    } else
      s = 0;
  }
  s = 0;
  for (int i = 0; i < n; i++) {
    temp = a[i] - x;
    if (temp + s > 0) {
      s += temp;
      if (s > re) re = s;
    } else
      s = 0;
  }
  return re;
}
long long getmid(long long l, long long r) {
  long long mid = (l + r) / 2;
  if (l + r < 0 && (l + r) % 2) mid--;
  return mid;
}
long long mid1, mid2, mid, ans1, ans2, ans3;
long long find(long long l, long long r) {
  if (l == r) return l;
  mid = getmid(l, r);
  mid1 = getmid(l, mid);
  mid2 = getmid(mid + 1, r);
  ans1 = cal(mid1);
  ans2 = cal(mid);
  ans3 = cal(mid2);
  if (ans1 > ans2 && ans2 > ans3) return find(mid + 1, r);
  if (ans1 < ans2 && ans2 < ans3) return find(l, mid);
  return find(mid1, mid2 - 1);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%I64d", a + i);
    a[i] *= 10000000;
  }
  long long temp = find(-100000000000LL, 100000000000LL);
  ans = cal(temp);
  printf("%.2lf", ((double)ans) / 10000000);
}
