#include <bits/stdc++.h>
#pragma GCC optimize("Ofast", "unroll-loops")
using namespace std;
const int inf = numeric_limits<int>::max() / 2;
const long double eps = 1e-9;
const long double pi = acos(-1);
inline void solve(), read();
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  read();
  solve();
  return 0;
}
const int MAXN = 1ll << 22;
inline bool checkbit(int n, int p) { return n & (1ll << p); }
int n, m, N;
vector<int> a;
int in[MAXN];
int used[MAXN][2];
void dfs(int v, int t) {
  if (used[v][t]) {
    return;
  }
  used[v][t] = 1;
  if (t == 0) {
    if (in[v]) {
      dfs(v, 1);
    }
  } else if (t == 1) {
    for (int k = 0; k < n; k++) {
      if (!checkbit(v, k)) {
        int nv = v | (1ll << k);
        dfs(nv, 1);
      }
    }
    dfs((N - 1) - v, 0);
  }
}
inline void solve() {
  int ans = 0;
  for (int i = 0; i < m; i++) {
    if (!used[a[i]][0]) {
      ++ans;
      dfs(a[i], 0);
    }
  }
  cout << ans << "\n";
}
inline void read() {
  cin >> n >> m;
  a.resize(m);
  for (int i = 0; i < m; i++) {
    cin >> a[i];
    in[a[i]] = 1;
  }
  N = 1ll << n;
}
