#include <bits/stdc++.h>
using namespace std;
int n, m, res;
bool visited[1 << 23];
vector<int> v;
void dfs(int node) {
  if (visited[node]) return;
  visited[node] = 1;
  if (node >= (1 << n))
    for (int i = 0; i < (n); i++)
      if (node != (node | (1 << i))) dfs(node | (1 << i));
  if (node >= (1 << n)) dfs(node ^ ((1 << (n + 1)) - 1));
  if (node < (1 << n)) dfs(node + (1 << n));
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < (1 << n); i++) visited[i] = 1;
  for (int i = 0; i < (m); i++) {
    int a;
    cin >> a;
    visited[a] = 0;
    v.push_back(a);
  }
  for (int i = 0; i < (m); i++)
    if (!visited[v[i]]) {
      res++;
      dfs(v[i]);
    }
  cout << res << endl;
}
