#include <bits/stdc++.h>
using namespace std;
const int N = (1 << 22) + 123;
int vis[N], mem[N], n, m;
void dfs(int u) {
  if (vis[u]) return;
  vis[u] = 1;
  for (int i = 0; i < n; ++i) {
    if ((u >> i) & 1) {
      if (!vis[u - (1 << i)]) dfs(u - (1 << i));
    }
  }
  if (mem[u]) dfs((1 << n) - 1 - u);
}
int res;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; ++i) {
    int x;
    scanf("%d", &x);
    mem[x] = 1;
  }
  for (int i = 0; i < (1 << n); ++i) {
    if (!vis[i] && mem[i]) {
      ++res;
      dfs(i);
    }
  }
  printf("%d", res);
  return 0;
}
