#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
 
#include<bits/stdc++.h>
using namespace std;

int n;
double A[100010];
double f(double x) {
  double res=0;
  rep(i,n){
    res+=x+A[i]-min(A[i],2.0*x);
  }
  return res;
}

 
int main(){
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);

  cin>>n;
  rep(i,n) cin>>A[i];
  
  double low = 0.0;
  double high = 10000000000;

  int cnt = 500;
  while (cnt--) {
      double c1 = (low * 2 + high) / 3;
      double c2 = (low + high * 2) / 3;

      if (f(c1) > f(c2)) low = c1;
      else high = c2;
  }
  

  cout<<fixed<<setprecision(10)<<f(low)/n<<endl;
    
  return 0;
}
#include <bits/stdc++.h>

using namespace std;
using int64 = long long;
using int128 = __int128;

constexpr int DEBUG = 0;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  int64 x, y, a, b;
  cin >> x >> y >> a >> b;

  int64 z = 0;
  while (true) {
    if (static_cast<int128>(x) * a >= x + b) break;
    if (static_cast<int128>(x) * a >= y) break;
    x = x * a;
    z++;
    // cout << x << " " << z << endl;
  }

  z += (y - x - 1) / b;

  cout << z << endl;
}