#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  int sz = 1 << n;
  int mx = 1 << (n + 1);
  vector<int> a;
  vector<bool> ma(mx);
  for (int i = 0; i < m; i++) {
    int el;
    cin >> el;
    int code = (el << 1) | 1;
    a.push_back(code);
    ma[code] = true;
  }
  vector<bool> was(mx);
  int ans = 0;
  for (int v : a) {
    if (was[v]) {
      continue;
    }
    vector<int> q = {v};
    was[v] = true;
    for (int qi = 0; qi < q.size(); qi++) {
      int cur = q[qi];
      vector<int> nxt;
      if (cur & 1) {
        nxt.push_back(cur ^ 1);
      } else {
        for (int k = 2; k < mx; k <<= 1) {
          if ((cur & k) == 0) {
            nxt.push_back(cur | k);
          }
        }
        int inv = (mx - 1) ^ cur;
        if (ma[inv] > 0) {
          nxt.push_back(inv);
        }
      }
      for (int u : nxt) {
        if (!was[u]) {
          was[u] = true;
          q.push_back(u);
        }
      }
    }
    ans++;
  }
  cout << ans << endl;
}
