#include <bits/stdc++.h>
using namespace std;
const int MAXN = 23;
int n, m;
bool visit[1 << MAXN], active[1 << MAXN];
void dfs(int u) {
  visit[u] = 1;
  ;
  for (int k = 0; k < n; ++k) {
    if (u & (1 << k)) {
      int v = u - (1 << k);
      if (!visit[v]) {
        dfs(v);
      }
    }
  }
  if (active[u]) {
    int inv = (1 << n) - 1 - u;
    if (!visit[inv]) {
      dfs(inv);
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int u;
    scanf("%d", &u);
    active[u] = true;
  }
  int ncomps = 0;
  for (int u = 0; u < 1 << n; ++u) {
    if (!visit[u] && active[u]) {
      ;
      visit[u] = 1;
      dfs((1 << n) - 1 - u);
      ++ncomps;
    }
  }
  printf("%d\n", ncomps);
}
