#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
const int MAX = (1 << 22);
const long long inf = 1e12;
int a[MAX], vis[MAX], uwu[MAX], owo, n;
void dfs(int u) {
  if (vis[u]) return;
  vis[u] = 1;
  if (uwu[u]) dfs(owo ^ u);
  for (long long i = 0; i < n; i++) {
    if ((1 << i) & u) dfs(u ^ (1 << i));
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int m;
  cin >> n >> m;
  for (long long i = 0; i < m; i++) {
    cin >> a[i];
    uwu[a[i]] = 1;
  }
  owo = (1 << n) - 1;
  int ans = 0;
  for (long long i = 0; i < m; i++) {
    if (!vis[a[i]]) {
      ans++;
      dfs((owo ^ a[i]));
    }
  }
  cout << ans << "\n";
  return 0;
}
