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

public class trolleys_rs_wrong implements Runnable {
    public static void main(String[] args) {
        new Thread(new trolleys_rs_wrong()).start();
    }

    private double eps = 1e-7;

    public void run() {
        try {
            solve();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private void solve() throws IOException {
        BufferedReader in = new BufferedReader(new FileReader("trolleys.in"));
        PrintWriter out = new PrintWriter(new FileWriter("trolleys.out"));
        
        StringTokenizer st = new StringTokenizer(in.readLine());
        int n = Integer.parseInt(st.nextToken());
        int m = Integer.parseInt(st.nextToken());
        double[] x = new double[n + n + 1];
        double[] y = new double[n + n + 1];
        for (int i = 0; i < n; i++) {
            st = new StringTokenizer(in.readLine());
            x[i] = Double.parseDouble(st.nextToken());
            y[i] = Double.parseDouble(st.nextToken());
            x[i + n] = x[i];
            y[i + n] = y[i];
        }
        x[n + n] = x[0];
        y[n + n] = y[0];
        
        double length = 0.0;
        for (int i = 0; i < n; i++) {
            length += Math.hypot(x[i + 1] - x[i], y[i + 1] - y[i]);
        }
        double L = length / m;
        
        int cur1 = 0;
        int cur2 = 0;
        double leftDist1 = Math.hypot(x[1] - x[0], y[1] - y[0]); 
        double leftDist2 = L; 
        while (true) {
            double dist = Math.hypot(x[cur2 + 1] - x[cur2], y[cur2 + 1] - y[cur2]);
            if (dist > leftDist2) {
                leftDist2 = dist - leftDist2;
                break;
            }
            leftDist2 -= dist;
            cur2++;
        }
        
        double result = 1e100; 
        while (cur1 < n) {
            double dist = Math.hypot(x[cur1 + 1] - x[cur1], y[cur1 + 1] - y[cur1]);
            double dx1 = (x[cur1 + 1] - x[cur1]) / dist;
            double dy1 = (y[cur1 + 1] - y[cur1]) / dist;
            double x1 = x[cur1] + (dist - leftDist1) * dx1;
            double y1 = y[cur1] + (dist - leftDist1) * dy1; 
            
            dist = Math.hypot(x[cur2 + 1] - x[cur2], y[cur2 + 1] - y[cur2]);
            double dx2 = (x[cur2 + 1] - x[cur2]) / dist;
            double dy2 = (y[cur2 + 1] - y[cur2]) / dist;
            double x2 = x[cur2] + (dist - leftDist2) * dx2;
            double y2 = y[cur2] + (dist - leftDist2) * dy2; 
            
            double dt = Math.min(leftDist1, leftDist2);
            result = Math.min(result, calc(x1, y1, dx1, dy1, x2, y2, dx2, dy2, dt));
            
            x1 = x1 + dt * dx1;
            y1 = y1 + dt * dy1;
            leftDist1 = leftDist1 - dt;
            x2 = x2 + dt * dx2;
            y2 = y2 + dt * dy2;
            leftDist2 = leftDist2 - dt;
            
            if (leftDist1 < eps) {
                cur1++;
                leftDist1 = Math.hypot(x[cur1 + 1] - x[cur1], y[cur1 + 1] - y[cur1]);
            }
            
            if (leftDist2 < eps) {
                cur2++;
                leftDist2 = Math.hypot(x[cur2 + 1] - x[cur2], y[cur2 + 1] - y[cur2]);
            }
        }
        
        out.println(result);
        
        in.close();
        out.close();
    }

    private double calc(double x1, double y1, double dx1, double dy1, double x2, double y2, double dx2, double dy2, double dt) {
        double result = Math.hypot(x1 - x2, y1 - y2);
        
        double a = (dx1 - dx2) * (dx1 - dx2) + (dy1 - dy2) * (dy1 - dy2);
        if (Math.abs(a) < eps) {
            return result;
        }
        
        double b = 2 * (dx1 - dx2) * (x1 - x2) + 2 * (dy1 - dy2) * (y1 - y2);
        double c = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
        
        double t = -b / 2 / a;
        if (t < 0 || t > dt) {
            return result;
        }
        
        return Math.min(result, Math.sqrt(c - b * b / 4 / a));
    }
}
