#include <bits/stdc++.h>
using namespace std;
const int maxn = (1 << 22) + 5;
bool is[maxn], vis[maxn];
int n, m, S, a[maxn];
void dfs(int x) {
  if (vis[x]) return;
  vis[x] = 1;
  if (is[x]) dfs(x ^ S);
  for (int i = 0; i < n; i++)
    if (x & (1 << i)) dfs(x ^ (1 << i));
}
int main() {
  cin >> n >> m;
  S = (1 << n) - 1;
  for (int i = 0; i < m; i++) {
    cin >> a[i];
    is[a[i]] = 1;
  }
  int ans = 0;
  for (int i = 0; i < m; i++) {
    if (!vis[a[i]]) {
      ans++;
      vis[a[i]] = 1;
      dfs(a[i] ^ S);
    }
  }
  cout << ans << endl;
  return 0;
}
