#include <iostream>
#include <vector>
#include <cmath>

#define EPS 1e-8

using namespace std;

int main() {
    int n, k;
    cin >> n >> k;
    vector<int> pop(n), dist(n);
    for (int i = 0; i < n; ++i) {
        cin >> pop[i] >> dist[i];
    }

    double lo = 0, hi = 300;
    while (true) {
        double mid = (lo+hi)/2;
        vector<double> dp(n, 0);
        vector<int> dp_count(n, 0);
        vector<double> place(n, -400);
        vector<int> place_count(n, 0);
        for (int i = 0; i < n; ++i) {
            double utility = -mid;
            for (int l = 0; l <= 30; ++l) {
                if (i-l < 0)
                    break;
                utility += pop[i-l]*pow(2.0, -(dist[i]-dist[i-l]));
                double new_ans = i-l-1 >= 0 ? (utility+dp[i-l-1]) : utility;
                double new_count = i-l-1 >= 0 ? (dp_count[i-l-1]+1) : 1;
                if (new_ans > place[i]) {
                    place[i] = new_ans;
                    place_count[i] = new_count;
                }
            }
            if (i > 0) {
                dp[i] = dp[i-1];
                dp_count[i] = dp_count[i-1];
            }
            utility = 0;
            for (int l = 0; l <= 30; ++l) {
                double new_ans = place[i-l]+utility;
                int new_count = place_count[i-l];
                if (new_ans > dp[i]) {
                    dp[i] = new_ans;
                    dp_count[i] = new_count;
                }
                if (i-l-1 < 0)
                    break;
                utility *= pow(2.0, -(dist[i-l]-dist[i-l-1]));
                utility += pop[i-l]*pow(2.0, -(dist[i-l]-dist[i-l-1]));
            }
        }

        if (hi-lo < EPS) {
            cout.precision(18);
            cout << dp[n-1] + lo*k << endl;
            return 0;
        }

        if (dp_count[n-1] < k) {
            hi = mid;
        } else {
            lo = mid;
        }
    }
}
