#include <bits/stdc++.h>
int a[4200000], vis[4200000], exi[4200000], maxx, n, m;
void dfs(int num) {
  if (vis[num]) return;
  vis[num] = 1;
  if (exi[num]) {
    vis[num] = 1;
    dfs(num ^ maxx);
  }
  for (int i = 0; i < n; i++) {
    if (num & (1 << i)) dfs(num ^ (1 << i));
  }
}
int main() {
  int ans = 0;
  scanf("%d%d", &n, &m);
  maxx = (1 << n) - 1;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &a[i]);
    exi[a[i]] = true;
  }
  for (int i = 1; i <= m; i++) {
    if (!vis[a[i]]) {
      ans++;
      dfs(a[i] ^ maxx);
    }
  }
  printf("%d\n", ans);
  return 0;
}
