#include <bits/stdc++.h>

using namespace std;

typedef long double LD;

typedef pair<LD, LD> PDD;

const LD eps = 1e-6;

int main()
{
	int n, m, k; scanf("%d %d %d", &n, &m, &k);
	vector<int> a(k + 1), vis(n + 1);
	for (int i = 1; i <= k; i++)
		scanf("%d", &a[i]), vis[a[i]] = 1;
	
	vector<PDD> suf(n + m + 1, {0.0, 0.0}), f(n + 1);
	for (int i = n - 1; i >= 0; i--)
	{
		if (vis[i]) f[i] = (PDD){1.0, 0.0};
		else f[i] = (PDD){(suf[i + 1].first - suf[i + m + 1].first) / m,
						 (suf[i + 1].second - suf[i + m + 1].second) / m + 1.0};
		suf[i] = (PDD){suf[i + 1].first + f[i].first, suf[i + 1].second + f[i].second};
	}
	
	if (abs(f[0].first - 1.0) < eps) printf("-1\n");
	else printf("%.10Lf\n", f[0].second / (1.0 - f[0].first));
	
	return 0;
}
//include <atcoder>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <tuple>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#define flush fflush(stdout)
#define endl '\n'
#define all(v) v.begin(), v.end()
#define pf(dans) printf("%.12lf", dans)
#define pfn(dans) pf(dans); cout << endl;
using namespace std;
//using namespace atcoder;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pl;
const int mod1 = (int)1e9 + 7, mod2 = (int)998244353;
const int INF = (int)1e9 + 10;
const ll LINF = (ll)1e18 + 10;
const int di[8] = {1, 0, -1, 0, 1, 1, -1, -1}, dj[8] = {0, 1, 0, -1, -1, 1, -1, 1};

#define rep0(i, n) for (i = 0; i < n; i++)
#define rep1(i, a, b) for (i = a; i < b; i++)

template <typename T>
T my_abs(T x){
    return (x >= 0)? x : -x;
}

template <typename T>
void chmax(T &a, T b){
    a = max(a, b);
}

template <typename T>
void chmin(T &a, T b){
    a = min(a, b);
}

ll gcd(ll a, ll b){
    if (a > b) return gcd(b, a);
    if (a == 0) return b;
    return gcd(b % a, a);
}

bool incld_bit(ll bit, int i){
    return ((bit>>i) & 1) == 1;
}

// --------------------------------------------------------------------------------

int n;
int x[20], y[20], z[20];
ll dp[(1<<17) + 3][20];
bool u[(1<<17) + 3][20] = {false};

int dist(int u, int v){
    return my_abs(x[v] - x[u]) + my_abs(y[v] - y[u]) + max(0, z[v] - z[u]);
}

void dfs(int bit, int v){
    int i;
    if (u[bit][v]){
        return;
    }
    rep0(i, n){
        if (i != v && incld_bit(bit, i)){
            dfs(bit - (1<<v), i);
            chmin(dp[bit][v], dp[bit - (1<<v)][i] + dist(i, v));
        }
    }
    u[bit][v] = true;
}

int main(void){
    int i, j;

    cin >> n;
    rep0(i, n){
        cin >> x[i] >> y[i] >> z[i];
    }

    int bit;
    rep0(bit, 1<<n){
        rep0(i, n){
            dp[bit][i] = LINF;
        }
    }
    dp[1][0] = 0;

    ll ans;
    ans = LINF;
    rep0(i, n){
        dfs((1<<n) - 1, i);
        chmin(ans, dp[(1<<n) - 1][i] + dist(i, 0));
    }

    cout << ans << endl;

    return 0;
}