#include <bits/stdc++.h>
const int N = 22;
int _w;
int n, m, a[1 << N], up[1 << N], down[1 << N], vis[1 << N];
int rev(int x) { return (~x) & ((1 << n) - 1); }
namespace DSU {
int pa[1 << N];
void init() {
  for (int i = 0; i < (1 << n); ++i) pa[i] = i;
}
int find(int u) { return pa[u] = u == pa[u] ? u : find(pa[u]); }
void link(int u, int v) {
  u = find(u), v = find(v);
  pa[u] = v;
}
}  // namespace DSU
int main() {
  _w = scanf("%d%d", &n, &m);
  DSU::init();
  for (int i = 0; i < m; ++i) {
    _w = scanf("%d", a + i);
    int b = rev(a[i]);
    DSU::link(a[i], b);
    down[b] = 1;
    up[a[i]] = 1;
  }
  for (int i = (1 << n) - 1; i >= 0; --i)
    for (int j = 0; j < n; ++j)
      if (i & (1 << j)) {
        int k = i ^ (1 << j);
        down[k] |= down[i];
      }
  for (int i = 0; i < (1 << n); ++i)
    for (int j = 0; j < n; ++j)
      if (!(i & (1 << j))) {
        int k = i ^ (1 << j);
        up[k] |= up[i];
      }
  for (int i = 0; i < (1 << n); ++i)
    if (up[i] && down[i])
      for (int j = 0; j < n; ++j)
        if (i & (1 << j)) {
          int k = i ^ (1 << j);
          if (up[k] && down[k]) DSU::link(i, k);
        }
  for (int i = 0; i < m; ++i) vis[DSU::find(a[i])] = 1;
  int ans = 0;
  for (int i = 0; i < (1 << n); ++i) ans += vis[i];
  printf("%d\n", ans);
  return 0;
}
