#include <bits/stdc++.h>
using namespace std;
const int maxn = 22;
int a[1 << maxn], n, m;
queue<int> q;
bool vis[1 << maxn], has[1 << maxn];
void Solve(int x) {
  queue<int> inner;
  while (!inner.empty()) inner.pop();
  if (vis[x]) return;
  inner.push(x);
  vis[x] = true;
  while (!inner.empty()) {
    int cur = inner.front();
    if (has[cur]) {
      has[cur] = false;
      q.push(cur);
    }
    inner.pop();
    for (int i = 0; i < n; i++) {
      if ((cur >> i & 1) && !vis[cur ^ (1 << i)])
        inner.push(cur ^ (1 << i)), vis[cur ^ (1 << i)] = true;
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) scanf("%d", &a[i]), has[a[i]] = true;
  int ans = 0;
  for (int i = 0; i < (1 << n); i++) {
    if (!has[i] || vis[i]) continue;
    ans++;
    has[i] = false;
    q.push(i);
    while (!q.empty()) {
      int cur = q.front();
      q.pop();
      Solve((1 << n) - 1 - cur);
    }
  }
  printf("%d\n", ans);
  return 0;
}
