#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <set>
#include <vector>
#include <utility>

using namespace std;

const int THRESH = 100;

int n, k;
int amt[30005];
int xloc[30005];
double lhsutil[30005][THRESH];
double rhsutil[30005][THRESH];
vector<pair<int, double>> edges[30005];

double dp[30005];
int used[30005];
int check(double penalty) {
  for(int i = 1; i <= n; i++) dp[i] = -1e100;
  dp[0] = 0;
  used[0] = 0;
  for(int i = 0; i < n; i++) {
    // important!
    if(false && dp[i] > dp[i+1]) {
      dp[i+1] = dp[i];
      used[i+1] = used[i];
    }
    for(auto out: edges[i]) {
      if(dp[out.first] < dp[i] + out.second - penalty) {
        dp[out.first] = dp[i] + out.second - penalty;
        used[out.first] = used[i] + 1;
      }
    }
  }
  return used[n];
}

int main() {
  cin >> n >> k;
  for(int i = 0; i < n; i++) cin >> amt[i] >> xloc[i];
  set<int> covered;
  {
    vector<pair<int, int>> v;
    for(int i = 0; i < n; i++) {
      v.emplace_back(amt[i], i);
    }
    sort(v.rbegin(), v.rend());
    for(int i = 0; i < min(n, k); i++) covered.insert(v[i].second);
  }
  double ret = 0;
  for(int i = 0; i < n; i++) {
    int dist = 1e9;
    {
      auto it = covered.lower_bound(i);
      if(it != covered.end()) dist = min(dist, xloc[*it] - xloc[i]);
      if(it != covered.begin()) {
        dist = min(dist, xloc[i] - xloc[*(--it)]);
      }
    }
    ret += amt[i] * pow(2., -dist);
  }
  cout << fixed << setprecision(12) << ret << "\n";
}