
// Problem: F - Sugoroku2
// Contest: AtCoder - AtCoder Beginner Contest 189
// URL: https://atcoder.jp/contests/abc189/tasks/abc189_f
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef tuple<int,int> tii;
typedef tuple<ll,ll> tll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<tii> vtii;
typedef vector<tll> vtll;
typedef vector<vector<int>> vvi;
#define INF 0x3f3f3f3f
#define X(t) get<0>(t)
#define Y(t) get<1>(t)
#define Z(t) get<2>(t)
#define pb push_back
#define dlt decltype
#define debug(...) _debug(#__VA_ARGS__, __VA_ARGS__)
#define prt(...) printf(__VA_ARGS__)
#ifdef LOCAL
constexpr const bool local=true;
#else
constexpr const bool local=false;
#endif
 
template <typename T>
void _debug(const char* format,const T t) {
    if (local) cerr << format << '=' << t << endl;
}

template <class First, class... Rest>
void _debug(const char* format,const First first,const Rest... rest) {
    if (local){
        while (*format != ',') cerr << *format++;
        cerr << '=' << first << ",";
        _debug(format + 1, rest...);    
    }
}

template <typename T>
ostream& operator<<(ostream& os, const vector<T>& V) {
    if (local) os << "[";
    for (const auto& vv : V) os << vv << " ";
    if (local) os << "]";
    return os;
}

template<class Tuple,size_t N>
struct TuplePrinter {
    static void print(ostream& os,const Tuple& t) {
        TuplePrinter<Tuple, N-1>::print(os,t);
        os << " " << get<N-1>(t);
    }
};
template<class Tuple>
struct TuplePrinter<Tuple,1>{
    static void print(ostream& os,const Tuple& t) {
    	os << get<0>(t);
    }
};
 
template<typename... Rest>
ostream& operator<<(ostream& os, const tuple<Rest...>& V) {
    if (local) os << "(";
	TuplePrinter<decltype(V),sizeof...(Rest)>::print(os,V);
    if (local) os << ")";
    return os;
}
template<class T1,class T2>
bool cmin(T1 &a,const T2 b){return a>b?a=b,1:0;}
template<class T1,class T2>
bool cmax(T1 &a,const T2 b){return a<b?a=b,1:0;}
template<class T1,class T2,class ...T3>
bool cmin(T1 &a,const T2 b,const T3 ...rest){return cmin(a,b)|cmin(a,rest...);}
template<class T1,class T2,class ...T3>
bool cmax(T1 &a,const T2 b,const T3 ...rest){return cmax(a,b)|cmax(a,rest...);}
 
ll _gcd(ll a,ll b){return b==0?a:_gcd(b,a%b);}
ll gcd(ll a,ll b){if (a<b) swap(a,b);return _gcd(a,b);}
ll gi(){
    ll i=0;bool f=false;char c;
    while (!isdigit(c=cin.get())&&cin.good()) f=c=='-';
    if (!cin.good()) return 0;
    do i=(i<<3)+(i<<1)+c-'0'; while (isdigit(c=cin.get()));
    return f?-i:i;
}

struct lnr{
	double a,b;
	lnr():a(0),b(0){}
	lnr(double b):a(0),b(b){}
	lnr(double a,double b):a(a),b(b){}
	lnr operator*(double x){return {a*x,b*x};}
	lnr& operator*=(double x){a*=x;b*=x;return *this;}
	
	lnr operator/(double x){return {a/x,b/x};}
	lnr& operator/=(double x){a/=x;b/=x;return *this;}
	
	lnr operator+(lnr x){return {a+x.a,b+x.b};}
	lnr& operator+=(lnr x){a+=x.a;b+=x.b;return *this;}
	lnr& operator-=(lnr x){a-=x.a;b-=x.b;return *this;}
	
	lnr operator()(const lnr &l){
		return {a*l.a,a*l.b+b};
	}
	double operator()(const double &l){
		return a*l+b;
	}
};

int n,m,k;
bitset<100010> b;
lnr f[100010];
struct solution{
	solution(){
		b.reset();
		memset(f,0,sizeof(f));
		n=gi();m=gi();k=gi();
		for (int i=1;i<=k;i++)
			b[gi()]=1;
	}
	void solve(){
		lnr sumf=0;
		for (int i=n-1;i>=0;i--){
			if (b[i]) f[i]=lnr(1,0);
			else f[i]=sumf/m+1;
			//debug(i,f[i].a,f[i].b);
			sumf+=f[i];
			if (i+m<=n) sumf-=f[i+m];
		}
		//x==f[0].a*x+f[0].b
		if (fabs(f[0].a-1)<1e-6){
			cout << -1 << endl;
		}else{
			printf("%.4lf",f[0].b/(1-f[0].a));	
		}
	}
};

int main(){
	ios::sync_with_stdio(false);
	int T=1;
	while (T--&&cin.good()){
		solution().solve();
	}
}
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define debug(x) {cerr<<#x<<" = "<<(x)<<endl;}

int main()
{
    ios::sync_with_stdio(false);
    ll b,c; cin>>b>>c;
    if(c==0) {cout<<1; return 0;}
    if(c==1) {cout<<2-(b==0); return 0;}
    ll d=c/2, e=(c-1)/2;
    if(abs(b)>c/2)
    {
        if(c%2)
            cout<<2*(d+e)+1;
        else
            cout<<3*d+e;
    }
    else if(abs(b)<=c/2)
    {
        if(b>0)
            if(c%2)
                cout<<2*d+2*b;
            else
                cout<<2*b+2*e+1;
        else
            if(c%2)
                cout<<2*(-b)+2*e+1;
            else
                cout<<2*(-b)+2*d;
    }
    return 0;
}