#pragma region Macros
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

#define REP2(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; ++i)
#define REP3(i, l, r) for (int i = (l), i##_len = (int)(r); i < i##_len; ++i)
#define GET_MACRO_REP(_1, _2, _3, NAME, ...) NAME
#define REP(...) GET_MACRO_REP(__VA_ARGS__, REP3, REP2) (__VA_ARGS__)
#define RREP2(i, n) for (int i = (n - 1); i >= 0; --i)
#define RREP3(i, l, r) for (int i = (r - 1), i##_len = (l); i >= i##_len; --i)
#define GET_MACRO_RREP(_1, _2, _3, NAME, ...) NAME
#define RREP(...) GET_MACRO_REP(__VA_ARGS__, RREP3, RREP2) (__VA_ARGS__)
#define IN(type, n) type n; cin >> n
#define INALL(type, v, s) vector<type> v(s); for (auto &e : v) { cin >> e; }
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())

#ifdef _DEBUG
#define DEBUG(x) cout << #x << ": " << x << endl
#else
#define DEBUG(x)
#endif

template<class T>bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
void yes() { cout << "Yes" << endl; }
void no() { cout << "No" << endl; }
#pragma endregion

vector<int> get_divisors(int n) {
  vector<int> divisors;
  for (int i = 1; i * i <= n; ++i) {
    if (n % i != 0) continue;
    divisors.emplace_back(i);
    if (n / i != i) divisors.emplace_back(n / i);
  }

  return divisors;
}

int main() {
  IN(int, N);
  vector<int> A(N);
  int min = INT_MAX;
  REP(i, N) {
    IN(int, a);
    chmin(min, a);
    A.at(i) = a;
  }

  map<int, int> divisors;
  for (auto const &a : A) {
    for (auto const &d : get_divisors(a)) {
      if (d > min) continue;
      divisors[d]++;
    }
  }

  int count = 0;
  bool min_flag = true;
  for (auto itr = divisors.begin(); itr != divisors.end(); ++itr) {
    vector<int> cand;
    REP(i, N) {
      if (A.at(i) % itr->first == 0) {
        cand.emplace_back(A.at(i));
      }
    }

    if (cand.size() < 2) continue;
    int gcd = cand.at(0);
    REP(i, 1, cand.size()) {
      gcd = __gcd(gcd, cand.at(i));
    }
    if (gcd == itr->first) {
      count++;
      if (itr->first == min) min_flag = false;
    }
  }

  if (min_flag) count++;
  cout << count << endl;

  return 0;
}

#include <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef  long long int ll;
typedef long double db;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T>
using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define pll pair<ll,ll>
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define ub(v,val) upper_bound(v.begin(),v.end(),val)
#define np(str) next_permutation(str.begin(),str.end())
#define lb(v,val) lower_bound(v.begin(),v.end(),val)
#define sortv(vec) sort(vec.begin(),vec.end())
#define rev(p) reverse(p.begin(),p.end());
#define v vector
#define pi 3.14159265358979323846264338327950288419716939937510
#define len length()
#define repc(i,s,e) for(ll i=s;i<e;i++)
#define fi first
#define se second
#define mset(a,val) memset(a,val,sizeof(a));
#define mt make_tuple
#define repr(i,n) for(i=n-1;i>=0;i--)
#define rep(i,n) for(i=0;i<n;i++)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define at(s,pos) *(s.find_by_order(pos))
#define set_ind(s,val) s.order_of_key(val)
long long int M = 1e9 + 7 ;
long long int inf = 9 * 1e18;
//CLOCK
ll begtime = clock();
#define time() cout << "\n\nTime elapsed: " << (clock() - begtime)*1000/CLOCKS_PER_SEC << " ms\n\n";
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//CLOCK ENDED
ll n, m;
// modular exponentiation
ll binpow(ll val, ll deg)
{
	if (deg < 0)
		return 0;
	if (!deg)
		return 1 % M;
	if (deg & 1)
		return binpow(val, deg - 1) * val % M;
	ll res = binpow(val, deg >> 1);
	return (res * res) % M;
}
//binomial
ll modinv(ll n) {
	return binpow(n, M - 2);
}

int main() {
	// your code goes here
	IOS;
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ll i, j, t, k, x, y, z,  N;
	cin >> n >> m >> k;
	map<ll, ll> fail;
	rep(i, k) {
		cin >> x;
		fail[x] = 1;
	}
	// dp[i]=a*dp[0]+b;
	db dp_sum[n + m], dp_carry[n + m];//dp_sum[i] denotes b of dp[i] and dp_carry[i] denotes the a of dp[i]
	rep(i, n + m) {
		dp_carry[i] = 0; dp_sum[i] = 0;
	}
	db sum = 0, car = 0;
	for (i = n - 1; i > 0; i--) {
		if (fail[i]) {
			dp_carry[i] = 1;
			dp_sum[i] = 0;

		}
		else {
			dp_carry[i] = car / db(m);
			dp_sum[i] = 1.0 + sum / db(m);
		}
		sum += dp_sum[i];
		car += dp_carry[i];
		sum -= dp_sum[i + m];
		car -= dp_carry[i + m];

	}
	sum = 1.0 + sum / db(m);
	car = car / db(m);
	// rep(i, n + m) {
	// 	cout << dp_sum[i] << ' ';
	// }
	db ans = sum / (1.0 - car);
	if (ans <= 0 || (1.0 - car) < 1e-7) cout << -1;
	else
		cout << fixed << setprecision(5) << ans;

	return 0;



}















