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;
long long length;
vector<double> nums;
double kadane(double x) {
  double currentMax = nums[0] - x;
  double currentMin = nums[0] - x;
  double globalMax = nums[0] - x;
  double globalMin = nums[0] - x;
  for (unsigned i = 1; i < nums.size(); i++) {
    currentMax = max(nums[i] - x, nums[i] - x + currentMax);
    currentMin = min(nums[i] - x, nums[i] - x + currentMin);
    if (currentMax > globalMax) globalMax = currentMax;
    if (currentMin < globalMin) globalMin = currentMin;
  }
  if (abs(globalMin) < globalMax)
    return globalMax;
  else
    return abs(globalMin);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  double num;
  cin >> length;
  for (int i = 0; i < length; i++) {
    cin >> num;
    nums.push_back(num);
  }
  double l = -10000, r = 10000;
  double m1, m2;
  double resM1, resM2;
  for (int i = 0; i < 200; i++) {
    m1 = l + (r - l) / 3;
    m2 = r - (r - l) / 3;
    resM1 = kadane(m1);
    resM2 = kadane(m2);
    if (resM1 < resM2)
      r = m2;
    else
      l = m1;
  }
  cout << fixed << setprecision(7) << resM1 << endl;
  return 0;
}
