#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int M = 1e9 + 7;
const double eps = 1e-6;
const double PI(acos(-1.0));
int n;
int m;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  vector<int> b(1 << n, 1);
  for (int i = 0; i < (m); i++) {
    int x;
    cin >> x;
    b[x] = 0;
  }
  int ans = 0;
  queue<int> q, in;
  vector<int> vis(1 << n, 0);
  for (int s = 0; s < (1 << n); s++) {
    if (b[s]) continue;
    ans++;
    b[s] = 1;
    q.push(s);
    while (((int)q.size())) {
      int u = q.front();
      q.pop();
      u = (1 << n) - 1 - u;
      if (!vis[u]) {
        vis[u] = 1;
        in.push(u);
        while (((int)in.size())) {
          int v = in.front();
          in.pop();
          if (!b[v]) {
            b[v] = 1;
            q.push(v);
          }
          for (int i = 1; i < (1 << n); i += i) {
            if ((v & i) && !vis[v ^ i]) {
              vis[v ^ i] = 1;
              in.push(v ^ i);
            }
          }
        }
      }
    }
  }
  cout << ans << endl;
}
