#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e6 + 100;
const int mod = (int)1e9 + 7;
const int inf = INT_MAX;
const long long ll_inf = LLONG_MAX;
const long double PI = acos((long double)-1.0);
const long double eps = 1e-6;
int n, m;
bool mark[1 << 22], have[1 << 22];
void dfs(int v) {
  mark[v] = true;
  for (int i = 0; i < n; ++i) {
    if (1 & (v >> i) && !mark[v ^ (1 << i)]) dfs(v ^ (1 << i));
  }
  if (have[v] && !mark[(1 << n) - 1 - v]) dfs((1 << n) - 1 - v);
}
void solve() {
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int x;
    cin >> x;
    have[x] = true;
  }
  int comps = 0;
  for (int msk = 0; msk < (1 << n); ++msk) {
    if (!mark[msk] && have[msk]) {
      dfs((1 << n) - 1 - msk);
      ++comps;
    }
  }
  cout << comps << endl;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  int T = 1;
  for (; T; --T) solve();
  return 0;
}
