#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cmath>
#include <complex>
#include <set>
#include <map>
using namespace std;

#define ALL(v) (v).begin(),(v).end()

typedef double D;
typedef complex<D> P;
typedef const P &rP;

const D EPS = 1e-9;

namespace std{
	bool operator< (const P &p, const P &q){
		if(p.real() != q.real()){ return p.real() < q.real(); }
		return p.imag() < q.imag();
	}
}

void normalize(vector<int> &v){
	rotate(v.begin(), min_element(ALL(v)), v.end());
}

D dot(rP va, rP vb){
	return real(va) * real(vb) + imag(va) * imag(vb);
}

D cross(rP va, rP vb){
	return real(va) * imag(vb) - imag(va) * real(vb);
}

int ccw(P a, P b, P c) {
	b -= a;
	c -= a;
	if (cross(b, c) > 0)	 return +1;			 // counter clockwise
	if (cross(b, c) < 0)	 return -1;			 // clockwise
	if (dot(b, c) < 0)		 return +2;			 // c--a--b on line
	if (norm(b) < norm(c)) return -2;			 // a--b--c on line
	return 0;
}

bool intersectSS(P pa1, P pa2, P pb1, P pb2){
	P da12 = pa2 - pa1;
	P db21 = pb1 - pb2;
	P dab1 = pb1 - pa1;

	D d = cross(da12, db21);

	if(abs(d) > EPS){
		D t = cross(dab1, db21) / d;
		D s = cross(da12, dab1) / d;
		
		if( (-EPS < t && t < 1.0 + EPS) && (-EPS < s && s < 1.0 + EPS) ){
			return true;
		}
	}
	return false;
}

bool containstript(rP a, rP b, rP c, rP pt){
	int x = ccw(a, b, pt);
	int y = ccw(b, c, pt);
	int z = ccw(c, a, pt);
	if(x == 1 && y == 1 && z == 1){ return true; }
	if(x == -1 && y == -1 && z == -1){ return true; }
	return false;
}

vector<P> convex_hull(vector<P> ps) {
	int n = ps.size(), k = 0;
	sort(ps.begin(), ps.end());

	vector<P> ch(2*n);
	for (int i = 0; i < n; ch[k++] = ps[i++]){ // lower-hull
		while (k >= 2 && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k;
	}
	for (int i = n-2, t = k+1; i >= 0; ch[k++] = ps[i--]){ // upper-hull
		while (k >= t && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k;
	}
	ch.resize(k-1);
	return ch;
}

struct solver{
	struct polygon{
		D len;
		vector<int> idxs;

		polygon(D l, const vector<int> &i) : len(l), idxs(i) {}

		bool operator< (const polygon &p) const{
			return len < p.len;
		}
	};

	rP getpt(const vector<int> &v, size_t i){
		return points[i == v.size() ? v[0] : v[i]];
	}

	size_t k;
	vector<P> points;
	map<P,int> toidx;
	vector<polygon> pols;
	set<vector<int>> seen;
	
	polygon makeplg(vector<int> idxs){
		normalize(idxs);
		int sz = idxs.size();
		D len = 0;
		for(int i = 0; i < sz; ++i){
			len += abs(getpt(idxs, i) - getpt(idxs, i + 1));
		}
		return polygon(len, idxs);
	}

	void add(const vector<int> &w){
		set<int> st;
		for(int x : w){
			if(!st.insert(x).second){ return; }
		}
		polygon pl = makeplg(w);
		if(seen.insert(pl.idxs).second){
			pols.insert(upper_bound(ALL(pols), pl), pl);
			while(pols.size() > k){ pols.pop_back(); }
		}
	}
	
	void validateadd(const vector<int> &v, int pos, int pi){
		int sz = v.size();
		for(int i = 0; i < sz; ++i){
			if(i + 1 == pos){ continue; }
			if(!(pos == 1 && i == sz - 1) && i + 2 != pos){
				if(intersectSS(getpt(v, i), getpt(v, i + 1), getpt(v, pos - 1), points[pi])){
					return;
				}
			}
			if(pos != i && !(pos == sz && i == 0)){
				if(intersectSS(getpt(v, i), getpt(v, i + 1), points[pi], getpt(v, pos))){
					return;
				}
			}
		}
		for(rP c : points){
			if(containstript(getpt(v, pos - 1), points[pi], getpt(v, pos), c)){
				return;
			}
		}
		vector<int> w = v;
		w.insert(w.begin() + pos, pi);
		add(w);
	}

	D solve(int n, int k_){
		k = k_;
		for(int i = 0; i < n; ++i){
			D x, y;
			cin >> x >> y;
			P p(x, y);
			points.push_back(p);
			toidx[p] = i;
		}

		vector<P> conv0 = convex_hull(points);
		vector<int> v0;
		for(rP p : conv0){
			v0.push_back(toidx[p]);
		}
		add(v0);

		for(size_t i = 0; i < pols.size(); ++i){
			polygon cur = pols[i];
			int sz = cur.idxs.size();
			for(int pos = 1; pos <= sz; ++pos)
			for(int pi = 0; pi < n; ++pi){
				validateadd(cur.idxs, pos, pi);
			}
		}

		if(pols.size() >= k){
			return pols[k - 1].len;
		}
		return -1;
	}
};

int main(){
	cout << fixed << setprecision(9);

	int n, k;
	while(cin >> n >> k && n){
		D ans = solver().solve(n, k);
		cout << ans << endl;
	}
}


Measured memory_bytes: 3476