#include <bits/stdc++.h>
using namespace std;
long long t, a[4500000], n, m, cnt, vis[4500000][2];
inline long long read() {
  long long ret = 0, ff = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') ff = -ff;
    ch = getchar();
  }
  while (isdigit(ch)) {
    ret = ret * 10 + ch - '0';
    ch = getchar();
  }
  return ret * ff;
}
void dfs(long long x, long long y) {
  if (vis[x][y]) return;
  vis[x][y] = 1;
  if (y == 0)
    dfs(x, 1);
  else {
    for (int i = 0; i < n; i++)
      if (!(x & (1 << i))) dfs(x | (1 << i), 1);
    if (a[(1 << n) - 1 - x]) dfs((1 << n) - 1 - x, 0);
  }
}
int main() {
  n = read(), m = read();
  for (int i = 1; i <= m; i++) {
    t = read();
    a[t] = 1;
  }
  for (int i = 0; i < (1 << n); i++) {
    if (a[i] && !vis[i][0]) {
      dfs(i, 0);
      cnt++;
    }
  }
  printf("%lld", cnt);
  return 0;
}
