#include <bits/stdc++.h>
using namespace std;
bitset<((1 << 23) + 1)> visited;
bitset<((1 << 23) + 1) / 2> present;
int E, M, W, mask, N;
bool flip = 0;
vector<int> edges(int i) {
  vector<int> res;
  if (flip == 0) {
    if (i < W) {
      res.push_back(W + i);
    } else {
      i -= W;
      res.push_back(i ^ mask);
      for (int j = 0; j < N; ++j) {
        int b = 1 << j;
        if ((b & i) == 0) {
          res.push_back(W + (b | i));
        }
      }
    }
  } else {
    if (i < W) {
      res.push_back((W + i) ^ mask);
    } else {
      i -= W;
      res.push_back(i);
      for (int j = 0; j < N; ++j) {
        int b = 1 << j;
        if ((b & i) != 0) {
          res.push_back(W + (i & (b ^ mask)));
        }
      }
    }
  }
  sort(res.begin(), res.end());
  return res;
}
int strongComponents() {
  int s = 0;
  visited = bitset<((1 << 23) + 1)>();
  for (int i = (0); i < (int)(((1 << 23) + 1)); ++i) visited[i] = 1;
  for (int i = (0); i < (int)(((1 << 23) + 1) / 2); ++i)
    if (present[i]) visited[i] = 0;
  for (int i = (0); i < (int)(W); ++i) visited[W + i] = 0;
  for (int i = (0); i < (int)(W); ++i)
    if (!visited[i]) {
      s++;
      stack<int> q;
      q.push(i);
      visited[i] = 1;
      while (!q.empty()) {
        int val = q.top();
        q.pop();
        for (int n : edges(val))
          if (visited[n] == 0) {
            visited[n] = 1;
            q.push(n);
          }
      }
    }
  return s;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> N >> M;
  present = bitset<((1 << 23) + 1) / 2>();
  for (int i = (0); i < (int)(((1 << 23) + 1) / 2); ++i) present[i] = 0;
  for (int i = (0); i < (int)(M); ++i) {
    int a;
    cin >> a;
    present[a] = 1;
  }
  W = 1 << N;
  mask = W - 1;
  int s = strongComponents();
  cout << s << endl;
  return 0;
}
