#include <bits/stdc++.h>
#define endl '\n'

#define double long double

using namespace std;
const int MAXN = (1 << 20);

int n;
int64_t k, a[MAXN];

void read()
{
	cin >> n >> k;
	for(int i = 0; i < n; i++)
		cin >> a[i];
}

double f(double p, double c, double a)
{
	return p * c + a / p;
}

double dp[MAXN];
double lga[MAXN];

int64_t solve(double cost)
{
	int64_t ret = 0;
	double lgc = log(1.0 / sqrt(cost));
	double lgk = log(k);

	for(int i = 0; i < n; i++)
	{
		int64_t ck = (int64_t)(sqrt(a[i]) / sqrt(cost));
		if(lga[i] + lgc > lgk) return k + 1;
		int64_t low = (int64_t)ck;
		int64_t high = (int64_t)ck + 1;
        double c_ret = (int64_t)1e17;
        int64_t c_pos = 0;

        for(int64_t candidate = low; candidate <= high; candidate++)
			if(c_ret > f(candidate, cost, a[i]))
			{
				c_ret = f(candidate, cost, a[i]);
				c_pos = candidate;
			}

		ret += c_pos;
		dp[i] = ((i) ? dp[i - 1] : 0) + (double)a[i] / (double)c_pos;
		if(ret > k) return ret;
	}

	return ret;
}

void solve()
{
	for(int i = 0; i < n; i++)
		lga[i] = log(sqrt(a[i]));

	double low = 0, high = 1e3, mid, ret;
	for(int ops = 0; ops < 69; ops++)
	{
        mid = (low + high) / 2.0;
        if(solve(mid) <= k) high = mid, ret = mid;
        else low = mid;
	}

	solve(ret);
	cout << (int64_t)(dp[n - 1] + 0.5) << endl;
}

int main()
{
	freopen("tallbarn.in", "r", stdin);
	freopen("tallbarn.out", "w", stdout);

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}