/*--------------------------------------------------------------*/
/* ACM ICPC 2007-2008                                           */
/* Northeastern European Regional Contest                       */
/* St Petersburg - Barnaul - Tashkent - Batumi, November 28, 200*/
/*--------------------------------------------------------------*/
/* Problem G. Game                                              */
/*--------------------------------------------------------------*/
/* Solution                                                     */
/*                                                              */
/* Author                Roman Satyukov                         */
/*--------------------------------------------------------------*/
 
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class game_rs implements Runnable {
	private BufferedReader in;
	private PrintWriter out;
	private BigRational ZERO = new BigRational(0, 1);
	
	private class BigRational {
		private BigInteger x, y;
		
		public BigRational(long x, long y) {
			this.x = BigInteger.valueOf(x);
			this.y = BigInteger.valueOf(y);
		}
		
		public BigRational(BigInteger x, BigInteger y) {
			BigInteger g = x.gcd(y);
			if (!g.equals(BigInteger.ONE)) {
				x = x.divide(g);
				y = y.divide(g);
			}
			this.x = x;
			this.y = y;
		}

		public BigRational subtract(BigRational that) {
			return new BigRational(this.x.multiply(that.y).subtract(this.y.multiply(that.x)), this.y.multiply(that.y));
		}
		
		public BigRational multiply(BigRational that) {
			return new BigRational(this.x.multiply(that.x), this.y.multiply(that.y));
		}
		
		public BigRational divide(BigRational that) {
			return new BigRational(this.x.multiply(that.y), this.y.multiply(that.x));
		}
		
		public boolean isZero() {
			return x.equals(BigInteger.ZERO);
		}

		public double doubleValue() {
			return x.doubleValue() / y.doubleValue();
		}
		
		@Override
		public String toString() {
			return "" + doubleValue();
		}
	}
	
	private BigRational[] gauss(double[][] w) {
		int n = w.length;
		BigRational[][] a = new BigRational[n][n + 1];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j <= n; j++) {
				int value = (int) Math.round(100 * w[i][j]);
				a[i][j] = new BigRational(value, 100);
			}
		}
		
		boolean[] mark = new boolean[n];
		int[] p = new int[n];
		for (int i = 0; i < n; i++) {
			int maxj = -1;
			for (int j = 0; j < n; j++) {
				if (!mark[j] && !a[j][i].isZero()) {
					maxj = j;
				}
			}
			if (maxj == -1) {
				p[i] = -1;
				continue;
			}
			mark[maxj] = true;
			p[i] = maxj;
			for (int j = 0; j < n; j++) {
				if (!a[j][i].isZero() && !mark[j]) {
					BigRational d = a[j][i].divide(a[maxj][i]);
					for (int k = 0; k <= n; k++) {
						a[j][k] = a[j][k].subtract(a[maxj][k].multiply(d));
					}
				}
			}
		}
		
		BigRational[] x = new BigRational[n];
		for (int i = n - 1; i >= 0; i--) {
			if (p[i] == -1) {
				System.out.println("skip");
				x[i] = ZERO;
				continue;
			}
			int j = p[i];
			x[i] = a[j][n];
			for (int k = i + 1; k < n; k++) {
				x[i] = x[i].subtract(x[k].multiply(a[j][k]));
			}
			x[i] = x[i].divide(a[j][i]);
		}
		return x;
	}

	private int encodePosition(int n, int pos, boolean wasFirst, boolean wasLast) {
		pos = (pos + n) % n;
		return pos * 4 + (wasFirst ? 1 : 0) + (wasLast ? 2 : 0);
	}
	
	private void solve() throws IOException {
		Locale.setDefault(Locale.US);
		StringTokenizer st = new StringTokenizer(in.readLine());
		int n = Integer.parseInt(st.nextToken());
		int k = Integer.parseInt(st.nextToken()) - 1;
		double[] p = new double[n - 1];
		st = new StringTokenizer(in.readLine());
		for (int i = 0; i < n - 1; i++) {
			p[i] = Double.parseDouble(st.nextToken());
		}
		if (n == 2) {
			out.println(1);
			return;
		}
		double[][] w = new double[4 * n][4 * n + 1];
		for (int i = 0; i < 4 * n; i++) {
			boolean wasFirst = ((i % 2) == 1);
			boolean wasLast = ((i / 2) % 2 == 1);
			int pos = i / 4;
			if (encodePosition(n, pos, wasFirst || pos == 0, wasLast || pos == n - 2) != i) {
				System.out.println("bad position");
				continue;
			}
			
			int goLeft = encodePosition(n, pos - 1, wasFirst || (pos - 1 == 0), wasLast || (pos - 1 == n - 2)); 
			int goRight = encodePosition(n, pos + 1, wasFirst || (pos + 1 == n), wasLast || (pos + 1 == n - 2));
			
			if (pos != n - 1) {
				w[i][goLeft] = 1 - p[pos];
				w[i][goRight] = p[pos];
				w[i][i] = -1;
			} else {
				w[i][i] = 1;
			}
		}
		w[4 * n - 1][4 * n] = 1;
		
		BigRational[] x = gauss(w);
		out.println(x[4 * k + (k == 0 ? 1 : 0) + (k == n - 2 ? 2 : 0)]);
	}
	
	public static void main(String[] args) {
		new Thread(new game_rs()).start();
	}

	public void run() {
		String problem = getClass().getName().split("_")[0];
		try {
			in = new BufferedReader(new FileReader(new File(problem + ".in")));
			out = new PrintWriter(new File(problem + ".out"));
			solve();
			in.close();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}
}
