#include <bits/stdc++.h>
using namespace std;
int mark[1 << 22];
int is[1 << 22];
int a[1 << 22];
int n, m;
int tot;
void dfs(int x) {
  if (mark[x]) return;
  mark[x] = 1;
  if (is[x]) dfs(tot ^ x);
  for (int j = 0; j < n; j++) {
    if (x >> j & 1) {
      dfs(x ^ (1 << j));
    }
  }
}
signed main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &a[i]);
    is[a[i]] = 1;
  }
  tot = (1 << n) - 1;
  int ans = 0;
  for (int i = 1; i <= m; i++) {
    if (mark[a[i]]) continue;
    ans++;
    dfs(a[i]);
  }
  printf("%d\n", ans);
  return 0;
}
