#include <bits/stdc++.h>
using namespace std;
int n, m, a[1 << 22], ans;
bool hav[1 << 22], vis[1 << 22];
inline int rd() {
  int x = 0, f = 1;
  char c = ' ';
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c <= '9' && c >= '0') x = x * 10 + c - '0', c = getchar();
  return x * f;
}
void dfs(int x) {
  if (vis[x]) return;
  vis[x] = 1;
  if (hav[x]) dfs(x ^ ((1 << n) - 1));
  for (int i = 0; i < n; i++) {
    if (x & (1 << i)) dfs(x ^ (1 << i));
  }
}
int main() {
  n = rd();
  m = rd();
  for (int i = 1; i <= m; i++) {
    a[i] = rd();
    hav[a[i]] = 1;
  }
  for (int i = 1; i <= m; i++) {
    if (!vis[a[i]]) {
      dfs(a[i] ^ ((1 << n) - 1));
      ans++;
    }
  }
  printf("%d", ans);
  return 0;
}
