#include <bits/stdc++.h>
using namespace std;
const int MAXN = (1 << 22) + 10;
inline int read() {
  int x = 0;
  char c = getchar();
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x;
}
int v[MAXN], n, m, cnt = 0;
bool vis[MAXN * 2 + 100], has[MAXN];
void dfs(int u) {
  vis[u] = 1;
  if (u >= MAXN)
    if (!vis[u - MAXN]) dfs(u - MAXN);
  if (u < MAXN && has[(1 << n) - 1 - u] && (!vis[(1 << n) - 1 - u + MAXN]))
    dfs((1 << n) - 1 - u + MAXN);
  if (u < (1 << n)) {
    int len = 0;
    while (len < n) {
      if (!((1 << len) & u) && (!vis[u | (1 << len)])) dfs(u | (1 << len));
      len++;
    }
  }
}
int main() {
  memset(vis, 0, sizeof(vis));
  memset(has, 0, sizeof(has));
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    v[i] = read();
    has[v[i]] = 1;
  }
  int ans = 0;
  for (int i = 1; i <= m; i++)
    if (!vis[v[i] + MAXN]) dfs(v[i] + MAXN), ans++;
  cout << ans << endl;
  return 0;
}
