#include <bits/stdc++.h>
using namespace std;
void setIO(const string& s) {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
}
const int N = 22;
int n, m;
bool vis[1 << N], vis2[1 << N], exist[1 << N];
void dfs(int v, int tp) {
  if (tp == 1) {
    vis[v] = 1;
    if (!vis2[v]) dfs(v, 2);
  } else {
    vis2[v] = 1;
    int complement = ((1 << n) - 1) - v;
    if (exist[complement] && !vis[complement]) dfs(complement, 1);
    for (int i = 0; i < n; ++i) {
      if (v & (1 << i)) continue;
      int to = (v | (1 << i));
      if (!vis2[to]) dfs(to, 2);
    }
  }
}
signed main() {
  setIO("input");
  cin >> n >> m;
  for (int i = 1; i <= m; ++i) {
    int x;
    cin >> x;
    exist[x] = 1;
  }
  int ans = 0;
  for (int i = 0; i <= (1 << n) - 1; ++i) {
    if (exist[i] && !vis[i]) {
      ++ans;
      dfs(i, 1);
    }
  }
  cout << ans << '\n';
}
