#include <bits/stdc++.h>
using namespace std;
int n, m, M, a[1 << 22];
bool vis[1 << 22], p[1 << 22];
void dfs(int v) {
  if (vis[v]) return;
  vis[v] = 1;
  for (int i = 0; i < n; ++i)
    if (v >> i & 1) dfs(v ^ 1 << i);
  if (p[v]) dfs(M ^ v);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> n >> m;
  int ans = 0;
  M = (1 << n) - 1;
  for (int i = 1; i <= m; ++i) cin >> a[i], p[a[i]] = 1;
  for (int i = 1; i <= m; ++i)
    if (!vis[a[i]]) ++ans, dfs(M ^ a[i]);
  cout << ans << "\n";
  return 0;
}
