#include <bits/stdc++.h>
using namespace std;
int N, M, te, all;
long long int be = 10000000000000;
int main() {
  cin >> N >> M;
  vector<int> vec;
  for (int i = 0; i < M; i++) {
    cin >> te;
    vec.push_back(te);
  }
  all = pow(2, N / 2);
  all = all - pow(2, M);
  for (int i = 0; i <= M; i++) {
    if (vec[i] == be + 1) all = 0;
    be = vec[i];
  }
  cout << all;
}
