#include <bits/stdc++.h>
using namespace std;
const int MAXN = 22;
const int MAXM = 1 << MAXN;
int n, m;
bool has[MAXM];
int mark[MAXM][2];
void dfs(int u, int f) {
  mark[u][f] = true;
  if (has[u] && f == 0 && !mark[u][1]) {
    dfs(u, 1);
  }
  int complement = (1 << n) - 1 ^ u;
  if (has[complement] && !mark[complement][0]) {
    dfs(complement, 0);
  }
  if (f == 1) {
    for (int i = 0; i < n; ++i) {
      int v = u | 1 << i;
      if (!mark[v][1]) {
        dfs(v, 1);
      }
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int a;
    scanf("%d", &a);
    has[a] = true;
  }
  int ans = 0;
  for (int mask = 0; mask < 1 << n; ++mask) {
    if (has[mask] && !mark[mask][0]) {
      ++ans;
      dfs(mask, 0);
    }
  }
  printf("%d\n", ans);
  return 0;
}
