#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 30;
const long long INF = 1LL << 60;
const int maxn = 1 << 23;
bool vis[maxn + 5], have[maxn + 5];
int a[maxn + 5];
int All, n, m;
void Dfs(int x) {
  if (vis[x]) return;
  vis[x] = true;
  int y = x ^ All;
  for (int i = 0; i <= n; i++) {
    if (x & (1 << i)) {
      int z = x ^ (1 << i);
      Dfs(z);
    }
  }
  if (have[x] && !vis[y]) Dfs(y);
  for (int i = 0; i <= n - 1; i++) {
    if (y & (1 << i)) {
      int z = y ^ (1 << i);
      if (have[x]) {
        Dfs(z);
      }
    }
  }
}
int main() {
  while (scanf("%d %d", &n, &m) != EOF) {
    memset(vis, 0, sizeof(vis));
    memset(have, 0, sizeof(have));
    for (int i = 1; i <= m; i++) {
      scanf("%d", &a[i]);
      have[a[i]] = true;
    }
    sort(a + 1, a + m + 1);
    All = (1 << n) - 1;
    int ans = 0;
    for (int i = 1; i <= m; i++) {
      if (!vis[a[i]]) {
        Dfs(a[i]);
        ans++;
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
