#include <bits/stdc++.h>
using i64 = long long;
std::vector<bool> a, visited;
int n, m;
void dfs(int v) {
  if (v < (1 << n)) {
    if (visited[v]) return;
    visited[v] = true;
    dfs((1 << n) + v);
  } else {
    if (visited[v]) return;
    visited[v] = true;
    int c = v - (1 << n);
    for (int j = 0; j < n; j++) {
      if (c & (1 << j)) continue;
      auto cc = (1 << n) + (c | (1 << j));
      if (visited[cc]) continue;
      dfs(cc);
    }
    auto c2 = (1 << n) - 1 - c;
    if (a[c2] && !visited[c2]) dfs(c2);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  a.resize(1 << n);
  visited.resize(2 * (1 << n));
  for (int i = 0; i < m; i++) {
    int b;
    scanf("%d", &b);
    a[b] = true;
  }
  int ret = 0;
  for (int i = 0; i < (1 << n); i++) {
    if (!a[i]) continue;
    if (visited[i]) continue;
    ret++;
    dfs(i);
  }
  printf("%d\n", ret);
  return 0;
}
