#include <bits/stdc++.h>
using namespace std;
bool present[1 << 22], vis[1 << 22];
int N, M, a[1 << 22];
inline int complement(int val) { return ((1 << N) - 1) ^ val; }
void dfs(int mask) {
  if (vis[mask]) return;
  vis[mask] = true;
  for (int k = 0; k < N; k++)
    if ((mask & (1 << k)) != 0) dfs(mask ^ (1 << k));
  if (present[mask]) dfs(complement(mask));
}
int main() {
  cin >> N >> M;
  for (int i = 0; i < M; i++) cin >> a[i], present[a[i]] = true;
  int ret = 0;
  for (int i = 0; i < M; i++) {
    if (!vis[a[i]]) {
      vis[a[i]] = true;
      dfs(complement(a[i]));
      ret++;
    }
  }
  cout << ret << '\n';
  return 0;
}
