#include <bits/stdc++.h>
using namespace std;
const int MAX = (1 << 22) + 5;
int full, n, m;
bool v[MAX], b[MAX], h[MAX];
void dfsans(int now);
void dfs(int now) {
  if (v[now]) return;
  v[now] = true;
  if (h[now]) dfsans(now);
  for (int i = 0; i < n; i++) {
    if (!(now & (1 << i))) continue;
    dfs(now ^ (1 << i));
  }
}
void dfsans(int now) {
  if (b[now]) return;
  b[now] = true;
  dfs(now ^ full);
}
int main() {
  scanf("%d%d", &n, &m);
  full = (1 << n) - 1;
  for (int i = 0; i < m; i++) {
    int x;
    scanf("%d", &x);
    h[x] = true;
  }
  int ans = 0;
  for (int i = 0; i < (full + 1); i++) {
    if (!h[i] || b[i]) continue;
    ans++;
    dfsans(i);
  }
  printf("%d\n", ans);
}
