#include <bits/stdc++.h>
using namespace std;
const int NMAX = (1 << 22) + 1;
int n, m, X, a[NMAX], ima[NMAX], vis[NMAX];
void Dfs(int x) {
  if (vis[x]) return;
  vis[x] = 1;
  if (ima[x]) Dfs(X ^ x);
  for (int i = 0; i < n; i++) {
    if (x & (1 << i)) Dfs(x ^ (1 << i));
  }
}
int main() {
  scanf("%d%d", &n, &m);
  X = (1 << n) - 1;
  for (int i = 0; i < m; i++) {
    scanf("%d", &a[i]);
    ima[a[i]] = 1;
  }
  int res = 0;
  for (int i = 0; i < (1 << n); i++) {
    if (!vis[i] && ima[i]) {
      res++;
      Dfs(X ^ i);
    }
  }
  cout << res;
  return 0;
}
