#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
const double eps = 1e-10, INF = 1e100;
int n, m;
double S, C, len[N];
pair<int, double> fir;
vector<pair<double, double> > ban;
struct point {
  double x, y;
  point(double _x = 0, double _y = 0) : x(_x), y(_y) {}
  friend point operator+(const point &a, const point &b) {
    return point(a.x + b.x, a.y + b.y);
  }
  friend point operator-(const point &a, const point &b) {
    return point(a.x - b.x, a.y - b.y);
  }
  friend point operator*(const point &a, const double &b) {
    return point(a.x * b, a.y * b);
  }
  friend point operator/(const point &a, const double &b) {
    return point(a.x / b, a.y / b);
  }
} p[N], unit[N];
double cdot(const point &a, const point &b) { return a.x * b.x + a.y * b.y; }
double cross(const point &a, const point &b) { return a.x * b.y - a.y * b.x; }
double dist(const point &a, const point &b) { return sqrt(cdot(a - b, a - b)); }
void update(double l, double r) {
  int t = l / S;
  ban.push_back(make_pair(l - S * t, r - S * t));
  ban.push_back(make_pair(l - S * (t + 1), r - S * (t + 1)));
}
bool insert(const point &a, const point &b, double r,
            pair<double, double> &range) {
  double c0 = cdot(a, a) - r * r, c1 = cdot(a, b) * 2, c2 = cdot(b, b);
  if (c2 < eps) {
    if (c0 < 0) {
      range = make_pair(-INF, INF);
      return 1;
    }
    return 0;
  }
  double delta = c1 * c1 - c0 * c2 * 4;
  if (delta < 0) return 0;
  delta = sqrt(delta);
  range = make_pair((-c1 - delta) / (2 * c2), (-c1 + delta) / (2 * c2));
  return 1;
}
void getres(double now) {
  pair<int, double> t0 = make_pair(0, 0), t1 = fir;
  double las = 0;
  while (t0.first < n) {
    double st = min(len[t0.first] - t0.second, len[t1.first] - t1.second);
    point p0 = p[t0.first] + unit[t0.first] * t0.second;
    point p1 = p[t1.first] + unit[t1.first] * t1.second;
    pair<double, double> range;
    bool fg = 0;
    if (insert(p1 - p0, unit[t1.first] - unit[t0.first], now, range)) {
      range.first = max(range.first, 0.0);
      range.second = min(range.second, st);
      if (range.second > range.first) {
        fg = 1;
        range.first += las;
        range.second += las;
        update(las, range.first);
        update(range.second, las + st);
      }
    }
    if (!fg) update(las, las + st);
    las += st;
    t0.second += st;
    t1.second += st;
    if (t0.second > len[t0.first] - eps) t0.second -= len[t0.first++];
    if (t1.second > len[t1.first] - eps) t1.second -= len[t1.first++];
  }
}
bool check(double now) {
  ban.clear();
  getres(now);
  sort(ban.begin(), ban.end());
  double las = 0;
  for (int i = 0; i < (int)ban.size(); ++i) {
    if (ban[i].first > las + eps) return 1;
    las = max(las, ban[i].second);
  }
  if (S > las + eps) return 1;
  return 0;
}
void getfir() {
  fir = make_pair(0, 0);
  double res = S;
  for (;;) {
    if (res < len[fir.first]) {
      fir.second = res;
      break;
    }
    res -= len[fir.first];
    ++fir.first;
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i)
    scanf("%lf%lf", &p[i].x, &p[i].y), p[n + i] = p[i];
  for (int i = 0; i < n << 1; ++i) {
    len[i] = dist(p[i], p[i + 1]);
    unit[i] = (p[i + 1] - p[i]) / len[i];
  }
  for (int i = 0; i < n; ++i) C += len[i];
  S = C / m;
  getfir();
  double l = 0, r = S;
  while (l + eps < r) {
    double mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  printf("%.10lf\n", r);
  return 0;
}
