#include <bits/stdc++.h>
using namespace std;
vector<double> arr;
int n, x;
vector<double> mult(vector<double> a, vector<double> b) {
  vector<double> c;
  c.resize(x + 1);
  for (int i = 0; i <= x; i++) {
    for (int j = 0; j <= x; j++) {
      if ((i ^ j) <= x) {
        c[i ^ j] += a[i] * b[j];
      }
    }
  }
  return c;
}
vector<double> power(vector<double> a, int n) {
  vector<double> res;
  res.resize(x + 1);
  res[0] = double(1.0);
  while (n) {
    if (n & 1) {
      res = mult(res, a);
    }
    a = mult(a, a);
    n >>= 1;
  }
  return res;
}
int main() {
  scanf("%d %d", &n, &x);
  x *= 2;
  arr.resize(x + 1);
  for (int i = 0; i <= x / 2; i++) {
    double prob;
    scanf("%lf", &prob);
    arr[i] = (double)prob;
  }
  vector<double> ans = power(arr, n);
  double answer = double(1.0) - ans[0];
  printf("%.9f\n", answer);
}
