#include <bits/stdc++.h>
using namespace std;
void qmax(int &x, int y) {
  if (x < y) x = y;
}
void qmin(int &x, int y) {
  if (x > y) x = y;
}
inline int read() {
  char s;
  int k = 0, base = 1;
  while ((s = getchar()) != '-' && s != EOF && !(isdigit(s)))
    ;
  if (s == EOF) exit(0);
  if (s == '-') base = -1, s = getchar();
  while (isdigit(s)) k = k * 10 + (s ^ '0'), s = getchar();
  return k * base;
}
inline void write(int x) {
  static char cnt, num[15];
  cnt = 0;
  if (!x) {
    putchar('0');
    return;
  }
  for (; x; x /= 10) num[++cnt] = x % 10;
  for (; cnt; putchar(num[cnt--] + 48))
    ;
}
const int maxn = 1 << 22;
int vis[maxn], f[maxn];
int n, m, a;
void dfs(int x) {
  if (f[x]) return;
  f[x] = 1;
  for (int i = 0; i < n; i++) {
    if (x & (1 << i)) {
      dfs(x - (1 << i));
    }
  }
  if (vis[x]) dfs((1 << n) - 1 - x);
}
int sum;
int main() {
  n = read();
  m = read();
  while (m--) {
    a = read();
    vis[a] = 1;
  }
  for (int i = 0; i < (1 << n); i++) {
    if (vis[i] && !f[i]) {
      sum++;
      dfs(i);
    }
  }
  printf("%d\n", sum);
  return 0;
}
