#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[4194404];
bool vis[2][1 << 22];
bool aru[1 << 22];
int mask;
void dfs2(int v);
void dfs1(int v) {
  vis[0][v] = true;
  dfs2(v ^ mask);
}
void dfs2(int v) {
  vis[1][v] = true;
  if (aru[v] && !vis[0][v]) dfs1(v);
  for (long long i = (long long)(0); i < (long long)(n); i++) {
    if (!((v >> i) & 1)) continue;
    int nv = v ^ (1 << i);
    if (vis[1][nv]) continue;
    dfs2(nv);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (long long i = (long long)(0); i < (long long)(m); i++) {
    scanf("%d", a + i);
    aru[a[i]] = true;
  }
  mask = (1 << n) - 1;
  int res = 0;
  for (long long i = (long long)(0); i < (long long)(m); i++) {
    if (vis[0][a[i]]) continue;
    dfs1(a[i]);
    res++;
  }
  cout << res << endl;
  return 0;
}
