/*--------------------------------------------------------------*/
/* ACM ICPC 2007-2008                                           */
/* Northeastern European Regional Contest                       */
/* St Petersburg - Barnaul - Tashkent - Batumi, November 28, 200*/
/*--------------------------------------------------------------*/
/* Problem G. Game                                              */
/*--------------------------------------------------------------*/
/* Solution                                                     */
/*                                                              */
/* Author                Roman Elizarov                         */
/*--------------------------------------------------------------*/
 
/*
    Solution for NEERC'2007 Problem G: Game
    (C) Roman Elizarov
    Note: this solution attempts to check correctness of the input
*/

import java.io.*;
import java.util.*;

public class game_re {

	public static void main(String[] args) throws Exception {
		new game_re().go();
	}

	int n;
	int k;

	void go() throws Exception {
		// read input
		XScanner in = new XScanner(new File("game.in"));
		in.useLocale(Locale.US);

		n = in.nextInt();
		k = in.nextInt();
		in.nextLine();

		assert n >= 2 && n <= 50;
		assert k >= 1 && k < n;

		double[] pr = new double[n];
		double[] pl = new double[n];
		for (int i = 0; i < n - 1; i++) {
			pr[i] = in.nextDouble();
			pl[i] = 1 - pr[i];
			assert pr[i] >= 0.01 && pr[i] <= 0.99 && Math.round(pr[i] * 100) / 100.0 == pr[i];
		}
		in.nextLine();
		in.close();

		// solve

		pr[n - 1] = Double.NaN;
		pl[n - 1] = Double.NaN;

		double ql[][][] = new double[n][n][2];
		double qr[][][] = new double[n][n][2];
		double q[][][] = new double[n][n][2];

		for (int i = 0; i < n; i++)
			for (int z = 0; z < 2; z++) {
				ql[i][i][z] = pl[i];
				qr[i][i][z] = pr[i];
			}
		
		k--;
		q[l(k)][k][0] = pl[k];
		q[k][r(k)][1] = pr[k];

		for (int t = 1; t < n - 1; t++)
			for (int i = 0; i < n; i++) {
				int j = (i + t) % n;
				ql[i][j][0] = pl[i] / (qr[r(i)][j][0] + pl[i] * ql[r(i)][j][0]);
				qr[i][j][0] = qr[r(i)][j][0] * pr[i] / (qr[r(i)][j][0] + pl[i] * ql[r(i)][j][0]);
				qr[i][j][1] = pr[j] / (ql[i][l(j)][1] + pr[j] * qr[i][l(j)][1]);
				ql[i][j][1] = ql[i][l(j)][1] * pl[j] / (ql[i][l(j)][1] + pr[j] * qr[i][l(j)][1]);

				q[l(i)][j][0] = q[i][j][0] * ql[i][j][0] + q[i][j][1] * ql[i][j][1];
				q[i][r(j)][1] = q[i][j][0] * qr[i][j][0] + q[i][j][1] * qr[i][j][1];
			}

		// write output
		PrintWriter out = new PrintWriter(System.out);
		out.println(q[n - 1][n - 2][0] + q[0][n - 1][1]);
		out.close();
	}

	private int l(int i) {
		return (i - 1 + n) % n;
	}

	private int r(int i) {
		return (i + 1) % n;
	}

//----------------- just for validation ------------------

	/**
	 * Strict scanner to veryfy 100% correspondence between input files and input file format specification.
	 * It is a drop-in replacement for {@link java.util.Scanner} that could be added to a soulution source
	 * (cut-and-paste) without breaking its ability to work with {@link java.util.Scanner}.
	 */
	public class XScanner {
		private final BufferedReader in;
		private String line = "";
		private int pos;
		private int lineNo;
		private boolean localeset;

		public XScanner(File source) throws FileNotFoundException {
			in = new BufferedReader(new InputStreamReader(System.in));
			nextLine();
		}

		public void close() {
			assert line == null : "Extra data at the end of file";
			try {
				in.close();
			} catch (IOException e) {
				throw new AssertionError("Failed to close with " + e);
			}
		}

		public void nextLine() {
			assert line != null : "EOF";
			assert pos == line.length() : "Extra characters on line " + lineNo;
			try {
				line = in.readLine();
			} catch (IOException e) {
				throw new AssertionError("Failed to read line with " + e);
			}
			pos = 0;
			lineNo++;
		}

		public String next() {
			assert line != null : "EOF";
			assert line.length() > 0 : "Empty line " + lineNo;
			if (pos == 0)
				assert line.charAt(0) > ' ' : "Line " + lineNo + " starts with whitespace";
			else {
				assert pos < line.length() : "Line " + lineNo + " is over";
				assert line.charAt(pos) == ' ' : "Wrong whitespace on line " + lineNo;
				pos++;
				assert pos < line.length() : "Line " + lineNo + " is over";
				assert line.charAt(0) > ' ' : "Line " + lineNo + " has double whitespace";
			}
			StringBuilder sb = new StringBuilder();
			while (pos < line.length() && line.charAt(pos) > ' ')
				sb.append(line.charAt(pos++));
			return sb.toString();
		}

		public int nextInt() {
			String s = next();
			assert s.length() == 1 || s.charAt(0) != '0' : "Extra leading zero in number " + s + " on line " + lineNo;
			assert s.charAt(0) != '+' : "Extra leading '+' in number " + s + " on line " + lineNo;
			try {
				return Integer.parseInt(s);
			} catch (NumberFormatException e) {
				throw new AssertionError("Malformed number " + s + " on line " + lineNo);
			}
		}

		public double nextDouble() {
			assert localeset : "Locale must be set with useLocale(Locale.US)";
			String s = next();
			assert s.length() == 1 || s.startsWith("0.") || s.charAt(0) != '0' : "Extra leading zero in number " + s + " on line " + lineNo;
			assert s.charAt(0) != '+' : "Extra leading '+' in number " + s + " on line " + lineNo;
			try {
				return Double.parseDouble(s);
			} catch (NumberFormatException e) {
				throw new AssertionError("Malformed number " + s + " on line " + lineNo);
			}
		}

		public void useLocale(Locale locale) {
			assert locale == Locale.US;
			localeset = true;
		}
	}
}
