Problem: Radewoosh is playing a computer game. There are n levels, numbered 1 through n. Levels are divided into k regions (groups). Each region contains some positive number of consecutive levels.

The game repeats the the following process:

  1. If all regions are beaten then the game ends immediately. Otherwise, the system finds the first region with at least one non-beaten level. Let X denote this region.
  2. The system creates an empty bag for tokens. Each token will represent one level and there may be many tokens representing the same level.
    * For each already beaten level i in the region X, the system adds ti tokens to the bag (tokens representing the i-th level). 
    * Let j denote the first non-beaten level in the region X. The system adds tj tokens to the bag. 
  3. Finally, the system takes a uniformly random token from the bag and a player starts the level represented by the token. A player spends one hour and beats the level, even if he has already beaten it in the past. 



Given n, k and values t1, t2, ..., tn, your task is to split levels into regions. Each level must belong to exactly one region, and each region must contain non-empty consecutive set of levels. What is the minimum possible expected number of hours required to finish the game?

Input

The first line of the input contains two integers n and k (1 ≤ n ≤ 200 000, 1 ≤ k ≤ min(50, n)) — the number of levels and the number of regions, respectively.

The second line contains n integers t1, t2, ..., tn (1 ≤ ti ≤ 100 000).

Output

Print one real number — the minimum possible expected value of the number of hours spent to finish the game if levels are distributed between regions in the optimal way. Your answer will be considered correct if its absolute or relative error does not exceed 10 - 4.

Namely: let's assume that your answer is a, and the answer of the jury is b. The checker program will consider your answer correct if <image>.

Examples

Input

4 2
100 3 5 7


Output

5.7428571429


Input

6 2
1 2 4 8 16 32


Output

8.5000000000

Note

In the first sample, we are supposed to split 4 levels into 2 regions. It's optimal to create the first region with only one level (it must be the first level). Then, the second region must contain other three levels.

In the second sample, it's optimal to split levels into two regions with 3 levels each.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <typename IT>
ostream &print(IT b, IT e, string sep = " ", ostream &stream = cout) {
  for (IT it = b; it != e; ++it) {
    stream << *it;
    if (it + 1 != e) stream << sep;
  }
  return stream;
}
template <typename IT>
istream &read(IT b, IT e, istream &stream = cin) {
  for (IT it = b; it != e; ++it) stream >> *it;
  return stream;
}
template <typename T>
ostream &operator<<(ostream &stream, vector<T> &t) {
  return print((t).begin(), (t).end(), " ", stream);
}
template <typename T>
ostream &operator<<(ostream &stream, vector<T> &&t) {
  return print((t).begin(), (t).end(), " ", stream);
}
template <typename T>
istream &operator>>(istream &stream, vector<T> &t) {
  return read((t).begin(), (t).end(), stream);
}
template <typename F, typename S>
ostream &operator<<(ostream &stream, const pair<F, S> t) {
  return stream << t.first << ' ' << t.second;
}
template <typename F, typename S>
istream &operator>>(istream &stream, pair<F, S> &t) {
  return stream >> t.first >> t.second;
}
template <typename T>
void print(T x, string end = "\n") {
  cout << x << end;
}
template <typename t>
void print(vector<t> arr, string sep = " ") {
  if (arr.empty()) {
    return;
  }
  print(arr.begin(), arr.end(), sep);
  cout << '\n';
}
template <typename T>
void print(vector<vector<T> > arr) {
  for (int i = 0; i < int(arr.size()); ++i) {
    cout << "[" << arr[i] << "]";
    if (i + 1 < int(arr.size())) cout << ", ";
  }
  cout << '\n';
}
template <typename T>
T _();
const long long MOD = 1e9 + 7;
template <typename T>
vector<T> operator+(const vector<T> &lhs, const vector<T> &rhs) {
  vector<T> ans(lhs);
  assert(ans.size() == rhs.size());
  for (int i = 0; i < rhs.size(); ++i) ans[i] += rhs[i];
  return ans;
}
template <typename T>
vector<T> operator+=(vector<T> &lhs, const vector<T> &rhs) {
  return lhs = lhs + rhs;
}
template <typename T>
vector<T> operator-(const vector<T> lhs, const vector<T> rhs) {
  vector<T> ans((lhs).begin(), (lhs).end());
  assert(ans.size() == rhs.size());
  for (int i = 0; i < rhs.size(); ++i) ans[i] -= rhs[i];
  return ans;
}
template <typename T>
vector<T> operator-=(vector<T> &lhs, const vector<T> &rhs) {
  return lhs = lhs - rhs;
}
template <typename T>
vector<T> append(vector<T> &lhs, const vector<T> rhs) {
  lhs.insert(lhs.end(), (rhs).begin(), (rhs).end());
  return lhs;
}
template <typename T>
T max(const vector<T> arr) {
  assert(!arr.empty());
  T ans = arr[0];
  for (auto &cur : arr) ans = max(ans, cur);
  return ans;
}
template <typename T>
T max(const set<T> s) {
  assert(!s.empty());
  return *--s.end();
}
template <typename T, typename G>
vector<T> set_max(vector<T> &base, const vector<G> &comp) {
  assert(base.size() == comp.size());
  for (int i = 0; i < (int)comp.size(); ++i) base[i] = max(base[i], comp[i]);
  return base;
}
const int N = 2e5 + 5, K = 52;
long double hsum[N], psum[N], esum[N];
long double range(int l, int r) { return 0; }
long double dp[N][K];
void fix(vector<pair<long double, long double> > &arr) {
  while (int(arr.size()) >= 3) {
    int n = int(arr.size());
    long double a1 = arr[n - 3].first;
    long double a2 = arr[n - 2].first;
    long double a3 = arr[n - 1].first;
    long double b1 = arr[n - 3].second;
    long double b2 = arr[n - 2].second;
    long double b3 = arr[n - 1].second;
    assert(b1 >= b2);
    assert(b2 >= b3);
    if ((a2 - a1) * (b2 - b3) >= (a3 - a2) * (b1 - b2)) {
      arr.erase(arr.begin() + n - 2);
      continue;
    }
    break;
  }
}
void _() {
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> psum[i];
    hsum[i] = 1.0 / psum[i];
    esum[i] = psum[i - 1] / psum[i] + 1;
    psum[i] += psum[i - 1];
    hsum[i] += hsum[i - 1];
    esum[i] += esum[i - 1];
  }
  fill(*dp, *dp + N * K, 1e18);
  dp[0][0] = 0;
  vector<int> start(K);
  vector<vector<pair<long double, long double> > > best(
      K, vector<pair<long double, long double> >(1, {0, 0}));
  for (int i = 1; i <= n; ++i) {
    for (int j = k; j >= 1; --j) {
      for (int t = start[j]; t < int(best[j].size()); ++t) {
        long double cur = psum[i] * hsum[i];
        long double a = best[j][t].first;
        long double b = best[j][t].second;
        cur += a + hsum[i] * b;
        if (dp[i][j] > cur) {
          dp[i][j] = cur;
          start[j] = t;
        } else
          break;
      }
      pair<long double, long double> add{dp[i][j], -psum[i]};
      best[j + 1].push_back(add);
      fix(best[j + 1]);
    }
  }
  print(dp[n][k] + esum[n] - psum[n] * hsum[n]);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(15);
  _();
}