#include <bits/stdc++.h>
using namespace std;
bool rem[1 << 22], ed[1 << 22];
vector<int> vec;
int n, m;
void dfs(int u) {
  ed[u] = true;
  if (rem[u]) {
    rem[u] = false;
    vec.push_back(u);
  }
  for (int i = 0; i < (int)(n); ++i) {
    if ((u >> i) & 1 & !ed[u ^ (1 << i)]) {
      dfs(u ^ (1 << i));
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < (int)(m); ++i) {
    int a;
    scanf("%d", &a);
    rem[a] = true;
  }
  int ans = 0;
  int id = 0;
  for (int i = 0; i < (int)(1 << n); ++i) {
    if (rem[i]) {
      ans++;
      vec.push_back(i);
      while (id < (int)(vec).size()) {
        int t = vec[id++];
        if (!ed[t ^ ((1 << n) - 1)]) dfs(t ^ ((1 << n) - 1));
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
