#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  bool f = 0;
  for (; !isdigit(c); c = getchar()) f ^= c == '-';
  for (; isdigit(c); c = getchar()) x = (x << 3) + (x << 1) + (c ^ 48);
  x = f ? -x : x;
}
const int maxN = 5e6 + 1;
int n, m, x, cnt, a[maxN];
bool vis[maxN];
queue<int> q;
void bfs(int x) {
  if (vis[x]) return;
  vis[x] = 1, q.push(x);
  while (!q.empty()) {
    int xx = q.front();
    q.pop();
    for (int j = 0; j < n; j++) {
      if ((xx & (1 << j))) {
        int t = xx - (1 << j);
        if (!vis[t]) {
          vis[t] = 1, q.push(t);
          if (a[t]) {
            int k = (1 << n) - t - 1;
            if (!vis[k]) vis[k] = 1, q.push(k);
          }
        }
      }
    }
  }
}
int main() {
  read(n), read(m);
  for (int i = 1; i <= m; i++) read(x), a[x] = 1;
  for (int i = 0; i < (1 << n); i++) {
    if (!a[i] || vis[i]) continue;
    cnt++;
    vis[i] = 1;
    bfs((1 << n) - i - 1);
  }
  printf("%d\n", cnt);
  return 0;
}
