#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-8, inf = 1e18;
inline int max(int x, int y) { return (x > y ? x : y); }
inline int min(int x, int y) { return (x < y ? x : y); }
int n, m, tot1, tot2, tot;
long double len, C;
struct pii {
  long double fi, se;
  pii(const long double X = 0, const long double Y = 0) : fi(X), se(Y) {}
  inline long double dis() { return fi * fi + se * se; }
  inline void print() { printf("%.9Lf %.9Lf\n", fi, se); }
} a[600010], f[600010], g[600010];
inline pii operator-(const pii &X, const pii &Y) {
  return pii(X.fi - Y.fi, X.se - Y.se);
}
struct func {
  long double fi, se, th;
  func(const long double Y = 0, const long double Z = 0,
       const long double W = 0)
      : fi(Y), se(Z), th(W) {}
  inline void print() { printf("%.9Lf %.9Lf %.9Lf\n", fi, se, th); }
};
inline func operator+(const func &X, const func &Y) {
  return func(X.fi + Y.fi, X.se + Y.se, X.th + Y.th);
}
struct data {
  long double fi;
  func se;
  data(const long double X = 0, const func Y = func(0, 0, 0)) : fi(X), se(Y) {}
} F[600010], G[600010], H[600010];
vector<data> P[600010];
inline pii GetL(pii X, pii Y) {
  long double k = (X.se - Y.se) / (X.fi - Y.fi), b = X.se - X.fi * k;
  return pii(k, b);
}
inline int read() {
  int x = 0;
  char c = getchar();
  bool y = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') y = 0;
  for (; c >= '0' && c <= '9'; c = getchar()) x = (x << 1) + (x << 3) + c - 48;
  if (y) return x;
  return -x;
}
inline func merge(pii X, pii Y) {
  X.se += X.fi * len;
  X = X - Y;
  return func(X.fi * X.fi, 2 * X.fi * X.se, X.se * X.se);
}
inline void Calc(const pii *a, data b[], int &cnt) {
  register int l = 1, r = 1;
  long double L = 0, R = len;
  func now;
  while (a[r + 1].fi < len) ++r;
  while (l <= n) {
    now = merge(GetL(a[r], a[r + 1]), GetL(a[l], a[l + 1]));
    if (a[l + 1].fi - L > a[r + 1].fi - R)
      b[++cnt] = data(L, now), L += (a[r + 1].fi - R), R += (a[r + 1].fi - R);
    else
      b[++cnt] = data(L, now), R += (a[l + 1].fi - L), L += (a[l + 1].fi - L);
    if (L + eps > a[l + 1].fi) ++l;
    if (R + eps > a[r + 1].fi) ++r;
  }
  b[++cnt] = data(len * m, func(0, 0, 0));
  return;
}
inline void Merge() {
  for (register int i = 1; i <= tot1; ++i)
    H[i].fi = F[i].fi, H[i].se = F[i].se + G[i].se;
  tot = tot1;
  return;
}
vector<pii> s;
inline pii Getf(func A, long double x) {
  if (fabs(A.fi) < eps) {
    if (A.th < x + eps) return pii(-inf, inf);
    return pii(1, 0);
  }
  long double ch = A.se * A.se - 4 * A.fi * (A.th - x);
  if (ch < 0) return pii(1, 0);
  ch = sqrt(ch);
  long double X = (-A.se - ch) / (2 * A.fi), Y = (-A.se + ch) / (2 * A.fi);
  if (X > Y) swap(X, Y);
  return pii(X, Y);
}
bool cmp(pii X, pii Y) { return X.fi < Y.fi; }
inline bool check(long double X) {
  int L, R, lim = m;
  s.clear();
  for (register int i = 1; i < tot; ++i) {
    pii now = Getf(H[i].se, X);
    if (now.fi > now.se) continue;
    now.fi = max(H[i].fi, now.fi);
    now.se = min(H[i + 1].fi, now.se);
    if (now.fi > now.se + eps) continue;
    L = floor(now.fi / len), R = floor(now.se / len);
    s.push_back(pii(now.fi - len * L, 1));
    s.push_back(pii(now.se - len * R, -1));
    lim -= R - L;
  }
  sort(s.begin(), s.end(), cmp);
  int sz = s.size(), ans = 0;
  for (register int i = 0; i < sz; ++i) {
    while (i < sz - 1 && fabs(s[i].fi - s[i + 1].fi) < eps) ans += s[i].se, ++i;
    ans += s[i].se;
    if (ans >= lim) return 1;
  }
  return 0;
}
inline void Input() {
  n = read();
  m = read();
  for (register int i = 1; i <= n; ++i) {
    a[i].fi = read(), a[i].se = read();
    if (i != 1) C = C + sqrt((a[i] - a[i - 1]).dis());
    f[i] = pii(C, a[i].fi);
    g[i] = pii(C, a[i].se);
  }
  C = C + sqrt((a[n] - a[1]).dis());
  len = C / m;
  for (register int i = 1; i <= n; ++i) {
    if (i != 1) C = C + sqrt((a[i] - a[i - 1]).dis());
    f[i + n] = pii(C, a[i].fi);
    g[i + n] = pii(C, a[i].se);
  }
  C = C + sqrt((a[n] - a[1]).dis());
  for (register int i = 1; i <= n; ++i) {
    if (i != 1) C = C + sqrt((a[i] - a[i - 1]).dis());
    f[i + 2 * n] = pii(C, a[i].fi);
    g[i + 2 * n] = pii(C, a[i].se);
  }
  return;
}
inline void solve() {
  Calc(f, F, tot1);
  Calc(g, G, tot2);
  Merge();
  long double l = 0, r = 2e8;
  while (r - l > eps) {
    long double mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  if (sqrt(l) < 0.09)
    puts("0");
  else
    printf("%.8Lf\n", sqrt(l));
  return;
}
int main() {
  Input();
  solve();
  return 0;
}
