#include <bits/stdc++.h>
using namespace std;
inline int gc() {
  const int BUFFSIZE = 1000000;
  static char buf[BUFFSIZE], *p1 = buf, *p2 = buf;
  return p1 == p2 &&
                 (p1 = p2 = buf, p2 += fread(buf, 1, BUFFSIZE, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline void read(int &x) {
  int s = 0;
  char c = gc();
  while (!isdigit(c)) c = gc();
  while (isdigit(c)) s = (s << 3) + (s << 1) + c - '0', c = gc();
  x = s;
}
const int N = (1 << 22) + 5;
bool vis[2][N], in[N];
int n, m, S, a[N], ans;
inline void dfs(int u, int v) {
  if (vis[v][u]) return;
  vis[v][u] = 1;
  if (v == 1)
    dfs(u, v ^ 1);
  else {
    for (register int i = 0; i < n; i++)
      if (!(u >> i & 1)) dfs(u ^ (1 << i), v);
    if (in[S ^ u]) dfs(S ^ u, v ^ 1);
  }
}
int main() {
  read(n), read(m), S = (1 << n) - 1;
  for (register int i = 1; i <= m; i++) read(a[i]), in[a[i]] = 1;
  for (register int i = 1; i <= m; i++)
    if (!vis[1][a[i]]) ans++, dfs(a[i], 1);
  cout << ans << endl;
}
