#include <bits/stdc++.h>
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
inline int read() {
  int f = 1, x = 0;
  char ch;
  do {
    ch = getchar();
    if (ch == '-') f = -1LL;
  } while (ch < '0' || ch > '9');
  do {
    x = x * 10 + ch - '0';
    ch = getchar();
  } while (ch >= '0' && ch <= '9');
  return f * x;
}
inline long long readll() {
  long long f = 1, x = 0;
  char ch;
  do {
    ch = getchar();
    if (ch == '-') f = -1LL;
  } while (ch < '0' || ch > '9');
  do {
    x = x * 10 + ch - '0';
    ch = getchar();
  } while (ch >= '0' && ch <= '9');
  return f * x;
}
template <class T>
inline void chmax(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
inline void chmin(T &a, T b) {
  if (a > b) a = b;
}
inline void swap(int &a, int &b) {
  int c = a;
  a = b;
  b = c;
}
using namespace std;
const int N = 1 << 22 | 7;
bitset<N> a, vis, vis2;
int n, m;
inline void dfs(int x, int t) {
  if (t)
    vis[x] = 1;
  else
    vis2[x] = 1;
  if (t) {
    int v = x ^ ((1 << n) - 1);
    if (!vis2[v]) dfs(v, 0);
  } else {
    if (!vis[x] && a[x]) dfs(x, 1);
    int qaq = 1 << n;
    for (int i = 1; i < qaq; i <<= 1) {
      if (x & i)
        if (!vis2[x ^ i]) dfs(x ^ i, 0);
    }
  }
}
int main() {
  n = read();
  m = read();
  for (int i = (1); i <= (m); ++i) {
    int x = read();
    a[x] = 1;
  }
  int ans = 0;
  for (int i = (0); i <= ((1 << n) - 1); ++i)
    if (a[i] && !vis[i]) ++ans, dfs(i, 1);
  printf("%d\n", ans);
  return 0;
}
