#include <bits/stdc++.h>
using namespace std;
const int N = 6e6;
int n, ans, m;
bool ok;
bool mark[N], obr[N], used[N], del[N];
int cnt, ord[N];
int getint() {
  char c = getchar();
  while (!isdigit(c)) c = getchar();
  int x = 0;
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x;
}
void dfs(int mask) {
  if (mark[mask]) return;
  mark[mask] = 1;
  if (used[mask]) ok = 1;
  for (int i = 0; i < n; i++)
    if ((mask & (1 << i)) == 0) dfs(mask + (1 << i));
  if (obr[mask]) dfs(((1 << n) - 1) ^ mask);
}
void go(int mask) {
  if (del[mask]) return;
  del[mask] = 1;
  for (int i = 0; i < n; i++)
    if ((mask & (1 << i)) != 0) go(mask - (1 << i));
  if (used[mask]) go(((1 << n) - 1) ^ mask);
  cnt++;
  ord[cnt] = mask;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int x = getint();
    used[x] = 1;
    obr[((1 << n) - 1) ^ x] = 1;
  }
  for (int i = 0; i < (1 << n); i++)
    if (!del[i]) go(i);
  int ans = 0;
  for (int i = (1 << n); i >= 1; i--) {
    int x = ord[i];
    ok = false;
    if (!mark[x]) {
      dfs(x);
      if (ok) ans++;
    }
  }
  cout << ans << "\n";
  return 0;
}
