#include <bits/stdc++.h>
using namespace std;
const int N = 22;
const int MX = 1 << N;
int n;
bool has[MX];
bool vis[MX];
bool num[MX];
void bfs(int node) {
  vis[node] = true;
  queue<pair<int, int> > nd;
  nd.push(make_pair(node, 1));
  int tt;
  int rem;
  while (!nd.empty()) {
    node = nd.front().first;
    tt = nd.front().second;
    nd.pop();
    if (tt == 1) {
      if (!num[node]) {
        num[node] = true;
        nd.push(make_pair(node, 2));
      }
    } else {
      rem = (1 << n) - 1 - node;
      if (!vis[rem] and has[rem]) {
        vis[rem] = true;
        nd.push(make_pair(rem, 1));
      }
      for (int j = 0; j < n; j++) {
        if (num[node | (1 << j)] == false) {
          num[node | (1 << j)] = true;
          nd.push(make_pair(node | (1 << j), 2));
        }
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int m;
  cin >> n >> m;
  int x;
  for (int i = 0; i < m; i++) {
    cin >> x;
    has[x] = true;
  }
  int ans = 0;
  for (int i = 0; i < (1 << n); i++) {
    if (has[i]) {
      if (!vis[i]) {
        bfs(i);
        ans++;
      }
    }
  }
  cout << ans << "\n";
  return 0;
}
