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