#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;

#define WINDOW 50

int main() {
  int N, K;
  while (cin >> N >> K) {
    vector<int> P(N), D(N);
    for (int i = 0; i < N; i++) cin >> P[i] >> D[i];

    vector<double> powHalf{1.0};
    for (int i = 0; i < 2*WINDOW; i++) powHalf.push_back(powHalf.back() / 2);
    vector<vector<double>> pv(WINDOW, vector<double>(N));
    for (int i = 0; i < N; i++)
    for (int j = 0; j < WINDOW; j++) {
      for (int k = max(0, i-WINDOW); k < i+WINDOW && k < N; k++) {
        if (D[k] >= D[i]-j/2) pv[j][i] += P[k]*(powHalf[min(2*WINDOW, abs(D[i]-D[k]))] -
                                                powHalf[min(2*WINDOW, abs(D[i]-j-D[k]))]);
      }
    }

    double lo = 0.0, hi = 1000.0, lambda;
    pair<double, int> ret;
    while (hi-lo > 1e-9) {
      lambda = (hi+lo)/2;
      vector<pair<double, int>> dyn(WINDOW);
      for (int i = 0; i < N; i++) {
        pair<double, int> next{0, 0};
        for (int j = WINDOW-1; j >= 0; j--) {
          int d = min(WINDOW-1, j + D[i] - (i ? D[i-1] : -1000000));
          double v = dyn[j].first + pv[d][i] - lambda;
          if (v > next.first) next = {v, dyn[j].second+1};
          if (j < WINDOW-1) {
            dyn[d] = max(dyn[d], dyn[j]);
            dyn[j] = {0, 0};
          }
        }
        dyn[0] = next;
      }
      ret = {0, 0};
      for (auto const& v : dyn) ret = max(ret, v);
      if (ret.second > K) lo = lambda; else hi = lambda;
    }
    cout << fixed << setprecision(6) << ret.first + K * lambda << endl;
  }
}
