#include <bits/stdc++.h>
using std::cerr;
using std::cin;
using std::max;
using std::min;
int n, m, Cn, flag;
double D, Sumd[200005];
struct point {
  double x, y;
  friend point operator+(point t1, point t2) {
    return {t1.x + t2.x, t1.y + t2.y};
  }
  friend point operator-(point t1, point t2) {
    return {t1.x - t2.x, t1.y - t2.y};
  }
  friend point operator*(point t1, double t2) { return {t1.x * t2, t1.y * t2}; }
} A[200005], B[200005];
struct info {
  double l, r;
} C[200005 << 1];
double F(double x) { return x * x; }
double Dist(point p1, point p2) {
  return sqrt(F(p1.x - p2.x) + F(p1.y - p2.y));
}
void insert(double l, double r) {
  if (r - l < 1e-7) return;
  if (r - l > D) return void(flag = 1);
  int x = floor(l / D), y = floor(r / D);
  l -= x * D, r -= y * D;
  if (x ^ y)
    C[++Cn] = {0, r}, C[++Cn] = {l, D};
  else
    C[++Cn] = {l, r};
}
bool Judge(double mid) {
  double t = 0, Lim1, Lim2, Min, a, b, c, kx, ky, bx, by, delta, x1, x2;
  int i = 1, j;
  point now1 = A[1], now2;
  flag = Cn = 0;
  for (j = 1; Sumd[j + 1] < D + 1e-7; j++)
    ;
  now2 = A[j] + B[j] * (D - Sumd[j]);
  for (; i <= n; t = Min) {
    Lim1 = Sumd[i + 1], Lim2 = Sumd[j + 1] - D, Min = min(Lim1, Lim2);
    kx = B[i].x - B[j].x, ky = B[i].y - B[j].y, bx = now1.x - now2.x,
    by = now1.y - now2.y;
    a = F(kx) + F(ky), b = 2 * kx * bx + 2 * ky * by,
    c = F(bx) + F(by) - F(mid);
    if (a > 1e-7) {
      delta = F(b) - 4 * a * c;
      if (delta > 0) {
        delta = sqrt(delta), x1 = (-b - delta) * .5 / a,
        x2 = (-b + delta) * .5 / a;
        insert(t, min(Min, t + x1)), insert(max(t, t + x2), Min);
      } else
        insert(t, Min);
    } else {
      if (fabs(b) > 1e-7) {
        x1 = -c / b;
        if (b > 1e-7)
          insert(max(t, t + x1), Min);
        else
          insert(t, min(Min, t + x1));
      } else if (c > 1e-7)
        insert(t, Min);
    }
    if (Lim1 < Min + 1e-7)
      now1 = A[++i];
    else
      now1 = now1 + B[i] * (Min - t);
    if (Lim2 < Min + 1e-7)
      now2 = A[++j];
    else
      now2 = now2 + B[j] * (Min - t);
    if (flag) return 0;
  }
  std::sort(C + 1, C + 1 + Cn, [](info t1, info t2) { return t1.l < t2.l; }),
      t = 0;
  for (int i = 1; i <= Cn; i++) {
    if (C[i].l - t > 1e-7) return 1;
    t = max(t, C[i].r);
  }
  if (D - t > 1e-7) return 1;
  return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%lf%lf", &A[i].x, &A[i].y);
  for (int i = 1; i <= n; i++) {
    A[i + n] = A[i],
          B[i] = B[i + n] = (A[i + 1] - A[i]) * (1. / Dist(A[i], A[i + 1]));
    Sumd[i + 1] = Sumd[i] + Dist(A[i], A[i + 1]);
  }
  for (int i = 2; i <= n; i++) Sumd[i + n] = Sumd[i] + Sumd[n + 1];
  D = Sumd[n + 1] / m;
  double l = 0, r = D, mid;
  for (; r - l > 1e-7;) mid = (l + r) * .5, Judge(mid) ? r = mid : l = mid;
  printf("%lf\n", l);
  return 0;
}
