#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-10;
const int N = 110000;
const int M = 10 * N;
int n, m;
long double x[N], y[N], l[N];
long double dx[N], dy[N];
struct seg {
  long double from, to;
  long double x1, y1, x2, y2, dx1, dy1, dx2, dy2;
  seg() {}
  seg(long double from, long double to, long double x1, long double y1,
      long double x2, long double y2, long double dx1, long double dy1,
      long double dx2, long double dy2)
      : from(from),
        to(to),
        x1(x1),
        y1(y1),
        x2(x2),
        y2(y2),
        dx1(dx1),
        dy1(dy1),
        dx2(dx2),
        dy2(dy2) {}
  pair<long double, long double> getSeg(long double v) {
    long double a = x1 - x2, b = dx1 - dx2, c = y1 - y2, d = dy1 - dy2;
    long double A = ((b) * (b)) + ((d) * (d)), B = 2 * (a * b + c * d),
                C = ((a) * (a)) + ((c) * (c)) - ((v) * (v));
    if (fabs(A) < 1e-8) {
      if (C < 0) return make_pair(from, to);
      return make_pair(-1.0, -1.0);
    }
    long double D = ((B) * (B)) - 4 * A * C;
    if (D < 0) return make_pair(-1.0, -1.0);
    long double t1 = (-B - sqrt(D)) / (A * 2);
    long double t2 = (-B + sqrt(D)) / (A * 2);
    t1 = max(t1, (long double)0.0);
    t2 = min(t2, to - from);
    if (t2 < t1) return make_pair(-1.0, -1.0);
    return make_pair(t1 + from, t2 + from);
  }
};
long double len, d;
vector<seg> vec;
vector<pair<long double, long double>> tmp, ins;
vector<long double> pts;
int b[M];
bool can(long double md) {
  tmp.clear();
  for (auto &t : vec) {
    auto ret = t.getSeg(md);
    if (ret.first > -EPS) tmp.push_back(ret);
  }
  pts.clear();
  pts.push_back(0);
  pts.push_back(d);
  for (auto &t : tmp) {
    long double a[] = {t.first, t.second};
    for (int i = 0; i < 2; i++) {
      long double p = a[i] - d * floor(a[i] / d);
      pts.push_back(p);
    }
  }
  sort(pts.begin(), pts.end());
  assert(pts.size() < M);
  ins.clear();
  for (auto &_t : tmp) {
    long double from = _t.first, to = _t.second;
    int f = round(floor(from / d)), t = round(floor(to / d));
    if (f == t)
      ins.emplace_back(from - d * f, to - d * f);
    else {
      ins.emplace_back(from - d * f, d);
      if (f + 1 < t)
        for (int i = f; i < t - 1; i++) ins.emplace_back(0, d);
      ins.emplace_back(0, to - d * t);
    }
  }
  memset(b, 0, sizeof b);
  for (auto &t : ins) {
    int fid = lower_bound(pts.begin(), pts.end(), t.first - EPS) - pts.begin();
    int tid = lower_bound(pts.begin(), pts.end(), t.second - EPS) - pts.begin();
    b[fid]++;
    b[tid]--;
  }
  for (int i = 1; i < M; i++) b[i] += b[i - 1];
  for (int i = 0; i < M; i++)
    if (b[i] == m) return 1;
  return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    double _x, _y;
    scanf("%lf%lf", &_x, &_y);
    x[i] = _x;
    y[i] = _y;
  }
  x[n] = x[0], y[n] = y[0];
  len = 0;
  for (int i = 0; i < n; i++) {
    l[i] = sqrt(((x[i + 1] - x[i]) * (x[i + 1] - x[i])) +
                ((y[i + 1] - y[i]) * (y[i + 1] - y[i])));
    dx[i] = (x[i + 1] - x[i]) / l[i];
    dy[i] = (y[i + 1] - y[i]) / l[i];
    len += l[i];
  }
  d = len / m;
  int id1 = 0, id2 = 0;
  long double rest1 = l[0], rest2 = l[0];
  long double x1 = x[0], y1 = y[0], dx1 = dx[0], dy1 = dy[0];
  long double x2 = x[0], y2 = y[0], dx2 = dx[0], dy2 = dy[0];
  long double rest = d;
  while (1) {
    if (rest > l[id2]) {
      rest -= l[id2];
      id2 = (id2 + 1) % n;
      rest2 = l[id2];
      x2 = x[id2], y2 = y[id2], dx2 = dx[id2], dy2 = dy[id2];
      continue;
    }
    rest2 = l[id2] - rest;
    x2 += dx[id2] * rest;
    y2 += dy[id2] * rest;
    break;
  }
  long double cur = 0;
  while (1) {
    rest = min(rest1, rest2);
    if (fabs(rest) > EPS)
      vec.push_back(seg(cur, cur + rest, x1, y1, x2, y2, dx1, dy1, dx2, dy2));
    rest1 -= rest;
    rest2 -= rest;
    if (fabs(rest1) < EPS)
      id1 = (id1 + 1) % n, rest1 = l[id1], x1 = x[id1], y1 = y[id1],
      dx1 = dx[id1], dy1 = dy[id1];
    else
      x1 += dx1 * rest, y1 += dy1 * rest;
    if (fabs(rest2) < EPS)
      id2 = (id2 + 1) % n, rest2 = l[id2], x2 = x[id2], y2 = y[id2],
      dx2 = dx[id2], dy2 = dy[id2];
    else
      x2 += dx2 * rest, y2 += dy2 * rest;
    cur += rest;
    if (fabs(cur - len) < EPS) break;
  }
  long double st = 0, en = 4000;
  for (int times = 0; times < 50; times++) {
    long double md = (st + en) / 2;
    if (can(md))
      en = md;
    else
      st = md;
  }
  printf("%.10lf\n", (double)st);
}
