#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 10;
const int M = 1000000007;
const double eps = 1e-9;
const double PI = acos(-1);
const int oo = 1000000000;
int n, m;
vector<int> g[(1 << 23) + 1];
bool is[(1 << 23) + 1], vis[(1 << 23) + 1];
int all, OR, ans = 0;
void dfs(int u) {
  if (vis[u]) return;
  vis[u] = 1;
  if (!(u & OR)) {
    if (is[u]) dfs(OR | ((~u) & all));
  } else {
    dfs(u ^ OR);
    for (int i = 0; i < n; ++i)
      if (u & (1 << i)) dfs(u ^ (1 << i));
  }
}
int main() {
  cin >> n >> m;
  OR = 1 << n;
  all = OR - 1;
  for (int x, i = 0; i < m; ++i) {
    scanf("%d", &x);
    is[x] = 1;
  }
  for (int i = 0; i < (1 << n); ++i)
    if (!vis[i] && is[i]) dfs(i), ++ans;
  cout << ans << endl;
  return 0;
}
