#include <bits/stdc++.h>
using namespace std;
const int N = (1 << 22) + 10;
int n, m, a[N], d[N];
bool bz[N], bz1[N];
void dfs(int x) {
  if (bz[x]) return;
  bz[x] = true;
  if (bz1[x]) d[++d[0]] = x;
  for (int i = 0; i <= n - 1; i++) {
    if ((x & (1 << i)) != 0) dfs(x ^ (1 << i));
  }
}
void work() {
  int h = 1;
  while (h <= d[0]) {
    bz[d[h]] = true;
    dfs(d[h] ^ ((1 << n) - 1));
    h++;
  }
}
int main() {
  int i, j, k;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= m; i++) {
    scanf("%d", &a[i]);
    bz1[a[i]] = true;
  }
  int ans = 0;
  for (i = 0; i <= ((1 << n) - 1); i++) {
    if (bz[i] == false && bz1[i] == true) {
      ans++;
      d[0] = 1;
      d[1] = i;
      work();
      printf("");
    }
  }
  printf("%d", ans);
}
