#include <bits/stdc++.h>
using namespace std;
const int N = 4195000;
long long n, m, cnt, f[N], topol[N], ans;
bool in[N], vis[N];
void dfs(long long x) {
  vis[x] = 1;
  if (in[x]) {
    long long v = (x ^ ((1 << n) - 1));
    if (!vis[v]) dfs(v);
  }
  for (int j = 0; j < n; j++)
    if (((x >> j) & 1)) {
      long long v = (x ^ (1 << j));
      if (!vis[v]) dfs(v);
    }
  topol[cnt] = (x), cnt++;
}
void DFS(long long x, long long y) {
  f[x] = y;
  if (in[((1 << n) - 1) ^ x]) {
    long long v = (((1 << n) - 1) ^ x);
    if (f[v] == 0) DFS(v, y);
  }
  for (int j = 0; j < n; j++)
    if (!((x >> j) & 1)) {
      long long v = (x ^ (1 << j));
      if (f[v] == 0) DFS(v, y);
    }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    long long v;
    cin >> v, in[v] = 1;
  }
  for (int i = 0; i < (1 << n); i++)
    if (vis[i] == 0) dfs(i);
  fill(vis, vis + N, 0);
  for (int i = (1 << n) - 1; i >= 0; i--) {
    long long v = topol[i];
    if (f[v] == 0) DFS(v, v + 1);
  }
  for (int i = 0; i < (1 << n); i++)
    if (in[i]) vis[f[i]] = 1;
  for (int i = 0; i <= (1 << n); i++) ans += vis[i];
  return cout << ans, 0;
}
