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

public class trolleys_md implements Runnable {
	private BufferedReader in;
	private PrintWriter out;

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

	private void solve() throws IOException {
		Locale.setDefault(Locale.US);
		in = new BufferedReader(new FileReader("trolleys.in"));
		out = new PrintWriter("trolleys.out");
		StringTokenizer st = new StringTokenizer(in.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		double[] x = new double[2 * n];
		double[] y = new double[2 * n];
		for (int i = 0; i < n; i++) {
			st = new StringTokenizer(in.readLine());
			x[i] = Integer.parseInt(st.nextToken());
			y[i] = Integer.parseInt(st.nextToken());
			x[i + n] = x[i];
			y[i + n] = y[i];
		}
		double l = 0;
		for (int i = 0; i < n; i++) {
			l += Math.hypot(x[i + 1] - x[i], y[i + 1] - y[i]);
		}
		l /= m;
		int i = 0;
		int j = 0;
		double li = 0;
		double lj = 0;
		while (l > 0) {
			double s = Math.hypot(x[j + 1] - x[j], y[j + 1] - y[j]);
			if (l < s) {
				lj = l;
				break;
			}
			l -= s;
			j++;
		}
		while (i < n) {
			double s1 = Math.hypot(x[i + 1] - x[i], y[i + 1] - y[i]);
			double left1 = s1 - li;
			double s2 = Math.hypot(x[j + 1] - x[j], y[j + 1] - y[j]);
			double left2 = s2 - lj;
			double x1 = x[i] + (x[i + 1] - x[i]) * li / s1;
			double y1 = y[i] + (y[i + 1] - y[i]) * li / s1;
			double x2 = x[j] + (x[j + 1] - x[j]) * lj / s2;
			double y2 = y[j] + (y[j + 1] - y[j]) * lj / s2;
			double dx = x2 - x1;
			double dy = y2 - y1;
			double vx1 = (x[i + 1] - x[i]) / s1;
			double vy1 = (y[i + 1] - y[i]) / s1;
			double vx2 = (x[j + 1] - x[j]) / s2;
			double vy2 = (y[j + 1] - y[j]) / s2;
			double vx = vx2 - vx1;
			double vy = vy2 - vy1;
			double len = Math.min(left1, left2);
			relax(dx, dy, vx, vy, len);
			left1 -= len;
			left2 -= len;
			li += len;
			lj += len;
			if (left1 <= 0) {
				li = 0;
				i++;
			}
			if (left2 <= 0) {
				lj = 0;
				j++;
			}
		}
		out.println(ansmin);
		in.close();
		out.close();
	}

	private void relax(double dx, double dy, double vx, double vy, double len) {
//		System.out.println(dx + " " + dy);
//		System.out.println((dx + vx * len) + " " + (dy + vy * len));
//		System.out.println();
		relax(dx, dy);
		relax(dx + vx * len, dy + vy * len);
		double a = vx * vx + vy * vy;
		double b = 2 * dx * vx + 2 * dy * vy;
		double c = dx * dx + dy * dy;
		if (Math.abs(a) < 1e-9)
			return;
		double fmin = c - b * b / (4 * a);
		relax(fmin);
	}

	private void relax(double dx, double dy) {
		relax(dx * dx + dy * dy);
	}

	private void relax(double d) {
		d = Math.sqrt(Math.max(d, 0));
		ansmin = Math.min(ansmin, d);
		ansmax = Math.max(ansmax, d);
	}
	
	double ansmin = 1e100;
	double ansmax = 0;

	public static void main(String[] args) {
		new Thread(new trolleys_md()).start();
	}

}
