As a German University in Cairo (GUC) student and a basketball player, Herr Wafa was delighted once he heard the news. GUC is finally participating in the Annual Basketball Competition (ABC). 

A team is to be formed of n players, all of which are GUC students. However, the team might have players belonging to different departments. There are m departments in GUC, numbered from 1 to m. Herr Wafa's department has number h. For each department i, Herr Wafa knows number si — how many students who play basketball belong to this department.

Herr Wafa was also able to guarantee a spot on the team, using his special powers. But since he hates floating-point numbers, he needs your help at finding the probability that he will have at least one teammate belonging to his department. 

Note that every possible team containing Herr Wafa is equally probable. Consider all the students different from each other.

Input

The first line contains three integers n, m and h (1 ≤ n ≤ 100, 1 ≤ m ≤ 1000, 1 ≤ h ≤ m) — the number of players on the team, the number of departments in GUC and Herr Wafa's department, correspondingly. 

The second line contains a single-space-separated list of m integers si (1 ≤ si ≤ 100), denoting the number of students in the i-th department. Note that sh includes Herr Wafa.

Output

Print the probability that Herr Wafa will have at least one teammate from his department. If there is not enough basketball players in GUC to participate in ABC, print -1. The answer will be accepted if it has absolute or relative error not exceeding 10 - 6.

Examples

Input

3 2 1
2 1


Output

1


Input

3 2 1
1 1


Output

-1


Input

3 2 1
2 2


Output

0.666667

Note

In the first example all 3 players (2 from department 1 and 1 from department 2) must be chosen for the team. Both players from Wafa's departments will be chosen, so he's guaranteed to have a teammate from his department.

In the second example, there are not enough players.

In the third example, there are three possibilities to compose the team containing Herr Wafa. In two of them the other player from Herr Wafa's department is part of the team.

Difficulty: MEDIUM_HARD
Tags: Dynamic programming

Combinatorics

Mathematics

Probability
Skill types: Dynamic programming

Starter code:

Solutions:
from math import lgamma, exp
(n, m, h) = map(int, input().split())
ds = list(map(int, input().split()))
(s, d) = (sum(ds), ds[h - 1])
if s < n:
	print(-1)
elif s + 1 < n + d:
	print(1)
else:
	print(1 - exp(lgamma(s - d + 1) + lgamma(s - n + 1) - lgamma(s) - lgamma(s - d - n + 2)))


from collections import Counter, defaultdict, deque
import sys
input = sys.stdin.readline

def solve():
	(n, m, h) = [int(x) for x in input().split()]
	arr = [int(x) for x in input().split()]
	s = sum(arr)
	if s < n:
		print(-1)
		return
	nk = s - arr[h - 1]
	if nk < n - 1:
		print(1)
		return
	p1 = 1
	for i in range(1, n):
		p1 *= nk / (s - i)
		nk -= 1
	p = 1 - p1
	print(p)
tt = 1
for test in range(tt):
	solve()


(n, m, h) = map(int, input().split())
s = list(map(int, input().split()))
ans = 1
for i in range(sum(s) - 1, sum(s) - s[h - 1], -1):
	ans *= (i - n + 1) / i
print(1 - ans if sum(s) >= n else -1)


(n, m, h) = map(int, input().split())
s = list(map(int, input().split()))
(n, h) = (n - 1, h - 1)
(a, b) = (sum(s) - s[h], s[h] - 1)
if a < n:
	print(-1 if a + b < n else 1)
else:
	r = 1
	if b > n:
		for i in range(a + b + 1, a + b + n + 1):
			r *= i / (i + b)
		print(1 - r)
	else:
		for i in range(a - n + 1, a + b - n + 1):
			r *= i / (i + n)
		print(1 - r)


def comb(n, m):
	if m == 0:
		return 1
	res = 1
	for i in range(m):
		res *= n - i
	for i in range(m):
		res //= i + 1
	return res
(n, m, h) = map(int, input().strip().split())
h -= 1
s = list(map(int, input().strip().split()))
s_sum = sum(s)
if s_sum < n:
	print(-1)
else:
	n1 = s[h] - 1
	n2 = s_sum - 1 - n1
	up = 0
	for i in range(1, min(n - 1, n1) + 1):
		up += comb(n1, i) * comb(n2, n - 1 - i)
	down = comb(n1 + n2, n - 1)
	print(up / down)


import sys
import math
(n, m, h) = [int(x) for x in input().split()]
arr = [int(x) for x in input().split()]
total = sum(arr)
if total < n:
	print('-1')
	sys.exit()
total1 = total - arr[h - 1]
rem = total - total1 - 1
total = total - 1
ans = 1
for i in range(n - 1):
	x = float(total1 - i)
	y = float(total - i)
	ans = float(ans * float(x / y))
ans = float(ans)
print('{0:.10f}'.format(round(1 - ans, 10)))


(n, m, h) = tuple(map(int, input().strip().split()))
arr = list(map(int, input().strip().split()))
tot = 0
for x in arr:
	tot = tot + x
if tot < n:
	print(-1)
else:
	arr[h - 1] = arr[h - 1] - 1
	tot = tot - 1
	n = n - 1
	other = tot - arr[h - 1]
	ans = 1.0
	iter = range(n)
	for i in iter:
		ans = ans * (other - i) / (tot - i)
	print(1 - ans)


(n, m, h) = map(int, input().split())
n -= 1
ans = 1
(*a,) = map(int, input().split())
k = sum(a) - 1
s = k - a[h - 1] + 1
if k < n:
	exit(print(-1))
for _ in range(n):
	if not s:
		exit(print(1))
	ans *= s / k
	s -= 1
	k -= 1
print(1 - ans)


import math

def binom(k, n):
	ret = 1
	for i in range(0, k):
		ret = ret * (n - i) // (i + 1)
	return ret
[n, m, h] = map(int, input().split())
l = list(map(int, input().split()))
t = sum(l) - 1
n = n - 1
l[h - 1] = l[h - 1] - 1
p = t - l[h - 1]
if n > t:
	print('{}'.format(-1))
else:
	print('{}'.format(1 - binom(n, p) / binom(n, t)))


import math
from sys import stdin, stdout

def ncr(n, r):
	if n < r:
		return 0
	r = min(r, n - r)
	ans = 1
	for i in range(r):
		ans *= n - i
		ans //= i + 1
	return ans
(n, m, h) = map(int, stdin.readline().split())
s = list(map(int, stdin.readline().split()))
tot = sum(s)
if n > tot:
	stdout.write(str(-1))
else:
	players_from_other_dept = tot - s[h - 1]
	players_remaining = tot - 1
	players_remaining_to_be_sel = n - 1
	ans = 1.0
	ans -= ncr(players_from_other_dept, players_remaining_to_be_sel) / ncr(players_remaining, players_remaining_to_be_sel)
	stdout.write('%.8f' % ans)


from math import *

def printNcR(n, r):
	p = 1
	k = 1
	if n - r < r:
		r = n - r
	if r != 0:
		while r:
			p *= n
			k *= r
			m = gcd(p, k)
			p //= m
			k //= m
			n -= 1
			r -= 1
	else:
		p = 1
	return p
(n, m, h) = map(int, input().split())
a = list(map(int, input().strip().split()))
if sum(a) < n:
	print(-1)
elif a[h - 1] == 1:
	print(0)
elif sum(a) == n or sum(a) - a[h - 1] < n - 1 or sum(a) - 1 < n - 1:
	print(1)
else:
	p = printNcR(sum(a) - a[h - 1], n - 1) / printNcR(sum(a) - 1, n - 1)
	print(1 - p)


import os, sys
from io import BytesIO, IOBase

def main():
	(n, m, h) = map(int, input().split())
	s = list(map(int, input().split()))
	x = sum(s)
	if x < n:
		print(-1)
	else:
		(b, a) = ([i for i in range(x - s[h - 1] + 1, x)], [i for i in range(x - n - s[h - 1] + 2, x - n + 1)])
		ans = 1
		for (x, y) in zip(a, b):
			ans *= x
			ans /= y
		print(1 - ans)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


(n, m, h) = map(int, input().split())
s = list(map(int, input().split()))
if sum(s) < n:
	print(-1)
elif s[h - 1] == 1:
	print(0)
elif sum(s) - s[h - 1] < n - 1:
	print(1)
else:
	x = 1.0
	ss = sum(s)
	sh = s[h - 1]
	for i in range(sh - 1):
		x *= (ss - n - i) / (ss - 1 - i)
	print(1 - x)


from functools import reduce
from operator import mul
from fractions import Fraction

def nCk(n, k):
	return int(reduce(mul, (Fraction(n - i, i + 1) for i in range(k)), 1))

def divide(a, b):
	return float(Fraction(a, b))

def main():
	(n, _, h) = list(map(int, input().split()))
	s = list(map(int, input().split()))
	s_sum = sum(s)
	if s_sum < n:
		print(-1)
	else:
		print(1 - divide(nCk(s_sum - s[h - 1], n - 1), nCk(s_sum - 1, n - 1)))
main()


import math

def ncr(n, r):
	i = n - r + 1
	ret = 1
	while i <= n:
		ret *= i
		i += 1
	return ret // math.factorial(max(r, 1))
(n, m, h) = map(int, input().split())
l = list(map(int, input().split()))
h -= 1
n -= 1
temp = l[h] - 1
l[h] = 0
s = sum(l)
if n > s + temp:
	print(-1)
else:
	print(round(1.0 - ncr(s, n) / ncr(s + temp, n), 6))


def fact(x):
	ans = 1
	for i in range(1, x + 1):
		ans *= i
	return ans

def C(x, y):
	return fact(x) // fact(y) // fact(x - y)
(m, n, h) = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
h -= 1
if s < m:
	print(-1)
elif s == m:
	if a[h] > 1:
		print(1)
	else:
		print(0)
else:
	ans = 1
	for i in range(s - a[h] + 1, s):
		ans *= (i - m + 1) / i
	print(1 - ans)


(n, m, h) = list(map(int, input().split()))
s = list(map(int, input().split()))
a = sum(s)
if a < n:
	print(-1)
elif a - s[h - 1] < n - 1:
	print(1)
else:
	d = 1
	for j in range(a - s[h - 1] - n + 2, a - s[h - 1] + 1):
		d *= j
	e = 1
	for j in range(a - n + 1, a):
		e *= j
	print(1 - d / e)


from math import *

def ncr(n, r):
	p = 1
	k = 1
	if n - r < r:
		r = n - r
	if r != 0:
		while r:
			p *= n
			k *= r
			m = gcd(p, k)
			p //= m
			k //= m
			n -= 1
			r -= 1
	else:
		p = 1
	return p
(n, m, h) = input().split()
n = int(n)
m = int(m)
h = int(h)
arr = list(map(int, input().split()))
sum = 0
for i in range(m):
	sum += arr[i]
if n == 1:
	print('0')
elif sum < n:
	print('-1')
elif sum == n and arr[h - 1] != 1:
	print('1')
else:
	fin = sum - 1
	left = sum - arr[h - 1]
	places = n - 1
	if left == 0 or left == 1:
		print(1)
	else:
		tot = ncr(fin, places)
		num = ncr(left, places)
		ans = num / tot
		sj = 1 - ans
		print(sj)


import math
(n, m, h) = map(int, input().split())
s = list(map(int, input().split()))
Sum = sum(s)
sum1 = Sum - 1
sum2 = Sum - s[h - 1]
if n - 1 > sum1:
	print(-1)
elif n - 1 > sum2:
	print(1)
else:
	ans = 0
	for i in range(sum2 - n + 2, sum2 + 1):
		ans += math.log(i)
	for i in range(sum1 - n + 2, sum1 + 1):
		ans -= math.log(i)
	ans = 1 - math.exp(ans)
	print(round(ans, 8))


(n, m, h) = map(int, input().split())
l = list(map(int, input().split()))
l[h - 1] -= 1
if l[h - 1] == -1:
	print(-1)
	exit()
su = sum(l)
if su < n - 1:
	print(-1)
	exit()
v = 1
v1 = 1
n -= 1
for i in range(su - l[h - 1] - n + 1, su + 1 - l[h - 1]):
	v *= i
for i in range(su - n + 1, su + 1):
	v1 *= i
ch = v / v1
print(1 - ch)


(n, m, h) = map(int, input().split())
M = [int(x) for x in input().split()]
M = [0] + M
tot = sum(M)
if tot < n:
	print(-1)
else:
	tot -= 1
	M[h] -= 1
	ans = 1.0
	others = tot - M[h]
	for i in range(0, n - 1):
		ans *= (others - i) / (tot - i)
	print(1.0 - ans)


def put():
	return map(int, input().split())

def ncr(x, y, r):
	a = b = 1
	for i in range(x - r + 1, x + 1):
		a *= i
	for i in range(y - r + 1, y + 1):
		b *= i
	return 1 - a / b
(n, m, h) = put()
l = list(put())
s = sum(l)
x = l[h - 1]
if s < n:
	print(-1)
elif s - x < n - 1:
	print(1)
else:
	print(ncr(s - x, s - 1, n - 1))


def nck(n, k):
	if n < k:
		return 0
	nu = 1
	d = 1
	if k > n - k:
		k = n - k
	for i in range(k):
		nu *= n - i
		d *= i + 1
	return nu // d
l = input().split()
n = int(l[0])
m = int(l[1])
h = int(l[2])
s = [int(i) for i in input().split()]
total = sum(s)
if total < n:
	print(-1)
else:
	print(1 - nck(total - s[h - 1], n - 1) / nck(total - 1, n - 1))


def int_space():
	return list(map(int, input().split()))

def multxy(x, y):
	res = 1
	for i in range(y, x, -1):
		res = res * i
	return res

def main():
	(n, m, h) = int_space()
	sum = hx = mx = ind = 0
	a = int_space()
	for i in a:
		sum = sum + i
		ind = ind + 1
		if ind == h:
			hx = i
	if sum < n:
		print(-1)
		exit(0)
	elif hx == 1:
		print(0)
		exit(0)
	mx = sum - hx
	sum = sum - 1
	hx = hx - 1
	n = n - 1
	res = multxy(mx - n, sum - n) / multxy(mx, sum)
	print(1 - res)
main()


(n, m, h) = [int(k) for k in input().split()]
w = [int(k) for k in input().split()]
if sum(w) < n:
	print(-1)
elif sum(w) - w[h - 1] < n - 1:
	print(1)
else:
	x = w[h - 1] - 1
	y = sum(w) - 1
	(delta1, delta2) = (1, 1)
	for j in range(y - n + 2, y + 1):
		delta1 *= j
	for j in range(y - x - n + 2, y - x + 1):
		delta2 *= j
	z = delta1
	v = delta2
	print(1 - v / z)


(n, m, h) = map(int, input().split())
s = list(map(int, input().split()))
sm = sum(s)
if n > sm:
	print(-1)
elif sm - s[h - 1] + 1 < n - 1:
	print(1)
elif s[h - 1] == 1:
	print(0)
else:
	a = sum(s) - s[h - 1]
	sm = sum(s)
	ans = 1
	for j in range(n - 1):
		ans *= (a - j) / (sm - j - 1)
	print(1 - ans)


(n, m, h) = input().split()
n = int(n)
m = int(m)
h = int(h)
a = a = [int(x) for x in input().split()]
summ = 0
for x in a:
	summ += x
if summ < n:
	print('-1')
else:
	summ -= 1
	n -= 1
	sum2 = summ - a[h - 1] + 1
	if sum2 < n:
		print('1')
	else:
		nu = 1
		cnt = 1
		for i in range(n):
			nu *= sum2
			cnt += 1
			sum2 -= 1
		de = 1
		cnt = 1
		sum1 = summ
		for i in range(n):
			de *= sum1
			cnt += 1
			sum1 -= 1
		nu = de - nu
		nu /= de
		print('%.9f' % nu)


(n, _, h) = [int(x) for x in input().split()]
s = [int(x) for x in input().split()]
h -= 1
n -= 1
s[h] -= 1
st = sum(s) - s[h]
if st + s[h] < n:
	print(-1)
elif n == 0:
	print(0)
elif st < n:
	print(1)
elif st == 0:
	print(0 if s[h] == 0 else 1)
else:

	def cmb(a, b):
		if b > a:
			return 0
		if b == 0:
			return 1
		import math
		return math.factorial(a) // (math.factorial(b) * math.factorial(a - b))
	ps = [0] * (n + 1)
	ca = [0] * (n + 1)
	cb = [0] * (n + 1)
	ca[1] = st
	cb[1] = s[h]
	ca[0] = 1
	cb[0] = 1
	for k in range(2, n + 1):
		ca[k] = ca[k - 1] * (st - k + 1) // k
		cb[k] = cb[k - 1] * (s[h] - k + 1) // k
	for k in range(n + 1):
		ps[k] = ca[n - k] * cb[k]
		pass
	pst = sum(ps)
	print((pst - ps[0]) / pst)


(n, m, h) = map(int, input().split())
s = list(map(int, input().split()))
t = sum(s)
if n > t:
	print(-1)
elif s[h - 1] == 1:
	print(0)
elif t - s[h - 1] + 1 < n:
	print(1)
else:
	a = t - s[h - 1]
	b = t - 1
	c = b - n + 1
	d = a - n + 1
	z = 1
	for i in range(a + 1, b + 1):
		z *= i
	y = 1
	for i in range(d + 1, c + 1):
		y *= i
	print(1 - y / z)


def nCk(n, k):
	res = 1
	for i in range(1, k + 1):
		res = res * (n - i + 1) // i
	return res
(n, _, me) = map(int, input().split())
a = [0] + list(map(int, input().split()))
s = sum(a)
if n > s:
	print(-1)
	exit()
allWays = nCk(s - 1, n - 1)
aa = nCk(s - a[me], n - 1)
print(1 - aa / allWays)


def nck(n, k):
	if n < k:
		return 0
	num = 1
	den = 1
	if k > n - k:
		return nck(n, n - k)
	for i in range(k):
		num = num * (n - i)
		den = den * (i + 1)
	return num // den
l = input().split()
n = int(l[0])
m = int(l[1])
h = int(l[2])
l = input().split()
li = [int(i) for i in l]
poss = sum(li) - 1
if poss < n - 1:
	print(-1)
else:
	ki = li[h - 1] - 1
	print(1 - nck(poss - ki, n - 1) / nck(poss, n - 1))


from functools import reduce

def F(s, x, n):
	ans = 1
	z = s - n
	for i in range(1, x):
		ans *= (z - i + 1) / (s - i)
	return ans
nmh = input().split()
n = int(nmh[0])
m = int(nmh[1])
h = int(nmh[2])
L = list(map(int, input().split()))
s = reduce(lambda x, y: x + y, L)
if s < n:
	print(-1)
else:
	x = L[h - 1]
	ans = F(s, x, n)
	pro = 1 - ans
	print(pro)


def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def msi():
	return map(str, input().split())

def li():
	return list(mi())

def ncr(n, k):
	C = [[0 for x in range(k + 1)] for x in range(n + 1)]
	for i in range(n + 1):
		for j in range(min(i, k) + 1):
			if j == 0 or j == i:
				C[i][j] = 1
			else:
				C[i][j] = C[i - 1][j - 1] + C[i - 1][j]
	return C[n][k]
(n, m, h) = mi()
s = [0] + li()
if sum(s) < n:
	print(-1)
else:
	av = sum(s) - 1
	dav = sum(s) - s[h]
	req = n - 1
	prob = 1
	for i in range(req):
		prob = prob * ((dav - i) / (av - i))
	print(1 - prob)


import os
from io import BytesIO, IOBase
import sys
from collections import defaultdict, deque, Counter
from bisect import *
from math import sqrt, pi, ceil, log, inf
from itertools import permutations
from copy import deepcopy
from heapq import *
from sys import setrecursionlimit

def main():
	(n, m, h) = map(int, input().split())
	a = list(map(int, input().split()))
	z = sum(a)
	if n > z:
		print(-1)
	else:
		y = z - a[h - 1]
		p = 1
		z = z - 1
		for i in range(n - 1):
			p = p * (y / z)
			y -= 1
			z -= 1
		print(1 - p)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


from itertools import zip_longest
(n, m, h) = map(int, input().split())
s = list(map(int, input().split()))
S = sum(s)
if S < n:
	print(-1)
	exit(0)
elif s[h - 1] == 1:
	print(0)
	exit(0)
elif S == n:
	print(1)
	exit(0)
numerators = {i for i in range(S - s[h - 1], S - s[h - 1] - (n - 1), -1)}
denominators = {i for i in range(S - 1, S - n, -1)}
(nn, dd) = ([], [])
for n in numerators:
	if n not in denominators:
		nn.append(n)
for d in denominators:
	if d not in numerators:
		dd.append(d)
ans = 1.0
for (n, d) in zip_longest(nn, dd):
	n = n if n else 1
	d = d if d else 1
	ans *= n / d
ans = min(1.0, 1 - ans)
print(ans)


from math import factorial as f

def ncr(n, r):
	return f(n) / (f(r) * f(n - r)) if n >= r else 0
(n, m, h) = map(int, input().split())
s = list(map(int, input().split()))
a = sum(s) - s[h - 1]
b = n - 1
c = sum(s) - 1
ans = 1
for i in range(c, a, -1):
	ans *= (i - b) / i
print(1 - ans if sum(s) >= n else -1)


R = lambda : map(int, input().split())

def cnt(n, k):
	res = 1
	for i in range(k):
		res = res * (n - i) / (k + 1)
	return res
(n, m, h) = R()
h -= 1
ps = list(R())
tot = sum(ps)
if tot < n:
	print(-1)
	exit(0)
if tot <= 1 or n <= 1 or ps[h] <= 1:
	print(0)
	exit(0)
if tot == n:
	print(1)
	exit(0)
ac = cnt(tot - 1, n - 1)
rem = cnt(tot - ps[h], n - 1)
print((ac - rem) / ac)


(n, m, h) = map(int, input().split())
h -= 1
S = list(map(int, input().split()))

def solve():
	if sum(S) < n:
		return -1
	if sum(S) - S[h] < n - 1:
		return 1
	sz_num1 = sum(S) - S[h]
	sz_num2 = sum(S) - n
	sz_den1 = sum(S) - 1
	sz_den2 = sum(S) - S[h] - n + 1
	min_sz = min(sz_num1, sz_num2, sz_den1, sz_den2)
	num = [k for k in range(min_sz + 1, sz_num1 + 1)] + [k for k in range(min_sz + 1, sz_num2 + 1)]
	den = [k for k in range(min_sz + 1, sz_den1 + 1)] + [k for k in range(min_sz + 1, sz_den2 + 1)]
	num.sort()
	den.sort()
	ans = 1
	(i_n, i_d) = (0, 0)
	while i_n < len(num) or i_d < len(den):
		if ans > 1:
			ans /= den[i_d]
			i_d += 1
		elif i_n < len(num):
			ans *= num[i_n]
			i_n += 1
		else:
			ans /= den[i_d]
			i_d += 1
	return 1 - ans
print('%.12f\n' % solve())