#include <bits/stdc++.h>
using namespace std;
bool vis[1 << 23];
bool hs[1 << 23];
int n, m;
int ans;
void dfs(int x) {
  vis[x] = true;
  if (x < (1 << n)) {
    for (int j = 0; j < n; j++) {
      if (x >> j & 1) continue;
      if (!vis[x | (1 << j)]) dfs(x | (1 << j));
    }
    if (hs[(1 << n) - 1 - x] && !vis[(1 << n + 1) - 1 - x])
      dfs((1 << n + 1) - 1 - x);
  } else {
    if (!vis[x - (1 << n)]) dfs(x - (1 << n));
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int x;
    scanf("%d", &x);
    hs[x] = true;
  }
  for (int i = 0; i < (1 << n); i++) {
    if (!hs[i] || vis[i + (1 << n)]) continue;
    ans++;
    dfs(i + (1 << n));
  }
  printf("%d", ans);
  return 0;
}
