#include <bits/stdc++.h>
using namespace std;
int vec[1 << 25];
int nw = 0, al = 0;
bool rem[1 << 22], ed[1 << 22];
int n, m;
void dfs(int u) {
  ed[u] = true;
  if (rem[u]) {
    rem[u] = false;
    vec[al++] = u;
  }
  for (int i = 0; i < (int)(n); ++i) {
    if ((u >> i) & 1 & !ed[u ^ (1 << i)]) {
      dfs(u ^ (1 << i));
    }
  }
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < (int)(m); ++i) {
    int a;
    cin >> a;
    rem[a] = true;
  }
  int ans = 0;
  for (int i = 0; i < (int)(1 << n); ++i) {
    if (rem[i]) {
      ans++;
      vec[al++] = i;
      while (nw < al) {
        if (!ed[vec[nw] ^ ((1 << n) - 1)]) dfs(vec[nw] ^ ((1 << n) - 1));
        nw++;
      }
    }
  }
  cout << ans << "\n";
  return 0;
}
