#include <bits/stdc++.h>
bool has[1 << 22];
bool vis[1 << 22][2];
int n, m;
std::string two(int u) {
  std::string ret;
  for (int i = 0; i < n; ++i) {
    ret += '0' + u % 2;
    u >>= 1;
  }
  return ret;
}
void dfs(int u, int c) {
  if (c == 0 && !has[u]) return;
  if (vis[u][c]) return;
  vis[u][c] = true;
  if (c == 1) {
    for (int i = 0; i < n; ++i)
      if (~u >> i & 1) {
        dfs(u | 1 << i, 1);
      }
    dfs(~u & (1 << n) - 1, 0);
  } else {
    dfs(u, 1);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int x;
    scanf("%d", &x);
    has[x] = true;
  }
  int result = 0;
  for (int u = 0; u < 1 << n; ++u)
    if (has[u] && !vis[u][0]) {
      result++;
      dfs(u, 0);
    }
  printf("%d\n", result);
}
