//#include <atcoder/maxflow.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
 

#include <iostream>
#include <map>
#include <list>
#include <set>
#include <algorithm>
#include <vector>
#include <string>
#include <functional>
#include <queue>
#include <deque>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <iterator>
#include <random>
#include <chrono>
#include <complex>
#include <bitset>
#include <fstream>
 
 
#define forr(i,start,count) for (int i = (start); i < (start)+(count); ++i)
#define set_map_includes(set, elt) (set.find((elt)) != set.end())
#define readint(i) int i; cin >> i
#define readll(i) ll i; cin >> i
#define readdouble(i) double i; cin >> i
#define readstring(s) string s; cin >> s

typedef long long ll;

 
//using namespace __gnu_pbds;
//using namespace atcoder;
using namespace std;

const ll modd = (1000LL * 1000LL * 1000LL + 7LL);
//const ll modd = 998244353;

int main(int argc, char *argv[])   {

    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    uniform_int_distribution<int> rand_gen(0, modd);   // rand_gen(rng) gets the rand no

    ios_base::sync_with_stdio(false);
    cin.tie(0);
 
    cout.precision(12);

//    readint(test_cases);
    int test_cases = 1;
    forr(t, 1, test_cases) {
        readint(n);
        vector<ll> a;
        forr(i,0,n) {
            readll(aa); a.push_back(2*aa);
        }
        sort(a.begin(), a.end());
        vector<ll> summ; summ.push_back(0);
        for(auto x : a) {
            summ.push_back(summ.back() + x);
        }

        ll minval = modd*modd;
        forr(i,0,n) {
            ll val = (ll)(i+1)*a[i]/2 + (summ.back() - summ[i+1]) - (ll)(n-i-1)*a[i]/2;
            minval = min(minval, val);
        }

        cout << (double)minval/static_cast<double>(2*n) << endl;
    }

    return 0;
}

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <queue>

using namespace std;
typedef long long ll;

int main(){
  ll X,Y,A,B;
  cin >> X >> Y >> A >> B;
  ll ans = 0;
  while(X<Y/A && X*A<=X+B){
    X *= A;
    ans++;
  }
  ans += (Y-1-X)/B;
  cout << ans << endl;
}
