#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vd = vector<double>;
using vs = vector<string>;
using vpii = vector<pair<int, int>>;
using vpll = vector<pair<ll, ll>>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const int N = (1 << 22) + 7;
bool ispres[N];
bool visited[N];
void dfs(int second, int n) {
  if (visited[second]) return;
  visited[second] = true;
  for (int bit = 0; bit < n; bit++) {
    if (second & (1 << bit)) {
      int u = second - (1 << bit);
      dfs(u, n);
    }
  }
  if (ispres[second]) dfs((1 << n) - 1 - second, n);
}
void solve() {
  int n, m;
  cin >> n >> m;
  vi a(m);
  for (ll i = 0; i < m; i++) cin >> a[i];
  ;
  for (ll i = 0; i < (m); i++) {
    ispres[a[i]] = true;
  }
  int comps = 0;
  for (int i = 0; i < (1 << n); i++) {
    if (ispres[i] && !visited[i]) {
      dfs((1 << n) - 1 - i, n);
      comps++;
    }
  }
  cout << comps << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ll t = 1;
  while (t--) {
    solve();
  }
}
