#pragma GCC optimize ("O3")

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

#define WINDOW 50

int main() {
  ios_base::sync_with_stdio(false);
  int N, K;
  while (cin >> N >> K) {
    K = min(K, N);
    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]))]);
      }
    }

    vector<vector<double>> dyn(WINDOW, vector<double>(K+2));
    vector<double> next(K+2);
    for (int i = 0; i < N; i++) {
      for (auto& x : next) x = 0;
      for (int j = WINDOW-1; j >= 0; j--) {
        int d = min(WINDOW-1, j + D[i] - (i ? D[i-1] : -1000000));
        for (int k = min(i, K); k >= 0 && K-k <= N-i; k--) {
          next[k+1] = max(next[k+1], dyn[j][k] + pv[d][i]);
          if (j < WINDOW-1) {
            dyn[d][k] = max(dyn[d][k], dyn[j][k]);
            dyn[j][k] = 0;
          }
        }
      }
      dyn[0].swap(next);
    }

    double ret = 0.0;
    for (int j = 0; j < WINDOW; j++) ret = max(ret, dyn[j][min(N, K)]);
    cout << fixed << setprecision(6) << ret << endl;
  }
}
