// Naive O(NK) solution to trains. Should produce correct outputs, but not run in time.

import java.util.*;
import java.io.*;

public class train_font
{
   public static void main(String[] args) throws Exception
   {
      PrintWriter out = new PrintWriter(System.out);
      new train_font(new FastScanner(System.in), out);
      out.close();
   }

   int N, K, R = 25;
   int[] people;
   int[] pos;

   double[][] costFwd, costBck;

   public train_font(FastScanner in, PrintWriter out)
   {
      N = in.nextInt();
      K = in.nextInt();
      people = new int[N];
      pos = new int[N];
      for (int i=0; i<N; i++)
      {
         people[i] = in.nextInt();
         pos[i] = in.nextInt();
      }

      costBck = new double[R][N];
      costFwd = new double[R][N];
      for (int i=0; i<N; i++)
      {
         double curCost = people[i];
         double mult = 1.0;
         int prev = i-1;
         for (int x=0; x<R; x++)
         {
            if (prev >= 0 && pos[i] - x == pos[prev])
            {
               curCost += people[prev] * mult;
               prev--;
            }
            mult *= 0.5;

            costBck[x][i] = curCost;
         }

         curCost = 0.0;
         mult = 1.0;
         int next = i+1;
         for (int y=0; y<R; y++)
         {
            if (next < N && pos[i] + y == pos[next])
            {
               curCost += people[next] * mult;
               next++;
            }
            mult *= 0.5;
               
            costFwd[y][i] = curCost;
         }
      }

      double best = 0.0;
      State bestState = null;

      State[][] table = new State[2*R+1][K+1];

      ArrayDeque<State> bag = new ArrayDeque<>();
      ArrayDeque<State> next = new ArrayDeque<>();
      for (int i=0; i<N; i++)
      {
         State nextState = new State(pos[i], i, 1, costBck[R-1][i]);
         next.add(nextState);
         table[0][1] = nextState;
         double result = costBck[R-1][i]+costFwd[R-1][i];
         if (result > best)
         {
            best = result;
            bestState = nextState;
         }
    
         for (State cur : bag)
         {
            cur.pos = Math.max(cur.pos, pos[i] - 2*R);

            int rr = pos[i] - cur.pos;
            if (rr == R-1 && cur.addForward)
            {
               cur.result += costFwd[R-1][cur.i];
               cur.addForward = false;
            }

            if (table[rr][cur.k] == null || table[rr][cur.k].result < cur.result)
            {
               table[rr][cur.k] = cur;
               next.add(cur);
            }

            if (cur.k < K)
            {
               int x1 = pos[cur.i];
               int x2 = pos[i];
               int mid1 = (x1+x2)/2;
               int mid2 = mid1+1;
               int r1 = Math.min(R-1, mid1-x1);
               int r2 = Math.min(R-1, x2-mid2);
               result = cur.result + costBck[r2][i];
               if (cur.addForward)
               {
                  result += costFwd[r1][cur.i];
               }
               
               if (cur.k+1 < K)
               {
                  nextState = new State(pos[i], i, cur.k+1, result);
                  nextState.prev = cur;
                  if (table[0][cur.k+1] == null || table[0][cur.k+1].result < nextState.result)
                  {
                     table[0][cur.k+1] = nextState;
                     next.add(nextState);
                  }
               }

               result += costFwd[R-1][i];
               if (result > best)
               {
                  best = result;
                  bestState = nextState;
               }
            }
         }
      
         bag.clear();
         for (State cur : next)
         {
            int rr = pos[i] - cur.pos;
            if (table[rr][cur.k] != null)
            {
               // Sneaky optimization if
               if (K - cur.k < N-i)
               {
                  bag.add(table[rr][cur.k]);
               }
               table[rr][cur.k] = null;
            }
         }
         next.clear();
      }

      out.printf("%.9f%n", best);

      /*
      ArrayList<Integer> targets = new ArrayList<>();
      while (bestState != null)
      {
         targets.add(pos[bestState.i]);
         out.printf("-> %d %d %.9f%n", bestState.i, pos[bestState.i], bestState.result);
         bestState = bestState.prev;
      }

      double final_res = 0;
      for (int i=0; i<N; i++)
      {
         int dist = Integer.MAX_VALUE;
         for (int p : targets)
         {
            dist = Math.min(dist, Math.abs(p - pos[i]));
         }
      
         double cost = people[i] * Math.pow(2, -dist);
         final_res += cost;
      }
      out.printf("%.9f%n", final_res);
      */
   }
}

class State
{
   boolean addForward;
   int pos, i, k;
   double result;

   State prev;

   public State(int pos, int i, int k, double result)
   {
      this.pos = pos;
      this.i = i;
      this.k = k;
      this.result = result;
      this.addForward = true;
      this.prev = null;
   }
}

class FastScanner{
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    
    public FastScanner(InputStream stream)
    {
        this.stream = stream;
    }
    
    int read()
    {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }
    
    boolean isSpaceChar(int c)
    {
        return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
    }
    
    boolean isEndline(int c)
    {
        return c=='\n'||c=='\r'||c==-1;
    }
    
    int nextInt()
    {
        return Integer.parseInt(next());
    }
    
    long nextLong()
    {
        return Long.parseLong(next());
    }
    
    double nextDouble()
    {
        return Double.parseDouble(next());
    }
    
    String next(){
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isSpaceChar(c));
        return res.toString();
    }
    
    String nextLine(){
        int c = read();
        while (isEndline(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isEndline(c));
        return res.toString();
    }
}
