#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = double;
const ll MODBASE = 1000000007LL;
const int MAXN = 5000010;
const int MAXM = 1000;
const int MAXK = 16;
const int MAXQ = 200010;
int n, m, a[MAXN], mask;
bool exist[MAXN], visit[MAXN];
void dfs(int u) {
  if (visit[u]) return;
  visit[u] = true;
  for (int i = (0); i <= (n - 1); i++)
    if (u & (1 << i)) dfs(u ^ (1 << i));
  if (exist[u]) dfs(mask ^ u);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cin >> n >> m;
  for (int i = (1); i <= (m); i++) {
    cin >> a[i];
    exist[a[i]] = true;
  }
  mask = (1 << n) - 1;
  int res = 0;
  for (int i = (1); i <= (m); i++)
    if (!visit[a[i]]) {
      dfs(mask ^ a[i]);
      res++;
    }
  cout << res;
  return 0;
}
