#include <bits/stdc++.h>
using namespace std;
const int MAX_M = (1 << 22);
int n, m, a[MAX_M];
bool present[MAX_M], vis[MAX_M][2];
int comp(int x) { return ((1 << n) - 1) ^ x; }
void dfs(int u, int ch) {
  vis[u][ch] = 1;
  if (ch) {
    if (present[u] && !vis[u][0]) dfs(u, 0);
    for (int i = 0; i < n; i++) {
      if (u >> i & 1) {
        int v = u ^ (1 << i);
        if (!vis[v][1]) dfs(v, 1);
      }
    }
  } else if (!ch && !vis[comp(u)][1])
    dfs(comp(u), 1);
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) scanf("%d", &a[i]), present[a[i]] = 1;
  int res = 0;
  for (int i = 0; i < m; i++) {
    if (!vis[a[i]][0]) dfs(a[i], 0), res++;
  }
  printf("%d\n", res);
  return 0;
}
