#include <bits/stdc++.h>
using namespace std;
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
inline int msbp(int x) { return 31 - __builtin_clz(x); }
inline int msb(int x) { return 1 << msbp(x); }
const int INF = 0x3f3f3f3f;
int n, m, ans, hi;
vector<int> a;
vector<bool> vis, have;
inline int get_id(int x, int b) { return (x << 1) ^ b; }
void add(queue<int>& nxt, int id) {
  if (!vis[id]) {
    vis[id] = 1;
    nxt.push(id);
  }
}
void bfs(int s) {
  queue<int> nxt;
  add(nxt, s);
  while (!nxt.empty()) {
    int curt = nxt.front();
    nxt.pop();
    int cur = curt >> 1, t = curt & 1;
    if (t == 0) {
      add(nxt, get_id(cur, 1));
    } else {
      int opp = hi - 1 - cur;
      if (have[opp]) add(nxt, get_id(opp, 0));
      while (opp) {
        int b = opp & -opp;
        opp -= b;
        add(nxt, get_id(cur + b, 1));
      }
    }
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  hi = 1 << n;
  a.resize(m);
  vis.resize(2 * hi);
  have.resize(hi);
  for (int i = 0; i < (m); ++i) {
    cin >> a[i];
    have[a[i]] = 1;
  }
  for (int i = 0; i < (m); ++i) {
    if (!vis[get_id(a[i], 0)]) {
      bfs(get_id(a[i], 0));
      ++ans;
    }
  }
  cout << ans << endl;
  return 0;
}
