#include <bits/stdc++.h>
using namespace std;
const int maxn = 5000000;
int n, m, st[maxn], vis[maxn], tong[maxn];
int p2[30] = {0, 1};
int P, ans;
void dfs(int x) {
  if (vis[x] == 1) return;
  vis[x] = 1;
  if (tong[x]) dfs(P ^ x);
  for (int i = 1; i <= n; i++)
    if (x & (1 << (i - 1))) dfs(x ^ (1 << (i - 1)));
}
int main() {
  memset(tong, 0, sizeof(tong));
  memset(vis, 0, sizeof(vis));
  for (int i = 2; i <= 25; i++) p2[i] = p2[i - 1] * 2;
  scanf("%d%d", &n, &m);
  P = p2[n + 1] - 1;
  for (int i = 0; i < m; i++) scanf("%d", &st[i]);
  for (int i = 0; i < m; i++) tong[st[i]] = 1;
  ans = 0;
  for (int i = 0; i < m; i++) {
    if (!vis[st[i]]) {
      ans++;
      vis[st[i]] = 1;
      dfs(P ^ st[i]);
    }
  }
  printf("%d\n", ans);
  return 0;
}
