#include <bits/stdc++.h>
using namespace std;
const int maxn = (1 << 22) + 5;
int n, m, a[maxn];
bool vis[maxn], f[maxn];
void dfs(int x) {
  if (vis[x]) return;
  vis[x] = 1;
  if (f[x]) dfs(x ^ ((1 << n) - 1));
  for (int i = 0; i < n; i++)
    if (x & (1 << i)) dfs(x ^ (1 << i));
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) scanf("%d", &a[i]), f[a[i]] = true;
  int res = 0;
  for (int i = 1; i <= m; i++) {
    if (!vis[a[i]]) {
      res++;
      vis[a[i]] = true;
      dfs(a[i] ^ ((1 << n) - 1));
    }
  }
  printf("%d\n", res);
  return 0;
}
