#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,sse3,sse4,popcnt,abm,mmx")
using namespace std;
bool isvowel(char c) {
  c = tolower(c);
  if (c == 'a' || c == 'e' || c == 'i' || c == 'y' || c == 'o' || c == 'u')
    return 1;
  return 0;
}
const double eps = 0.000001;
const long double pi = acos(-1);
const int maxn = 1e7 + 9;
const int mod = 1e9 + 7;
const long long MOD = 1e18 + 9;
const long long INF = 1e18 + 123;
const int inf = 2e9 + 11;
const int mxn = 1e6 + 9;
const int N = (1 << 22) + 12;
const int PRI = 555557;
const int pri = 997;
const int Magic = 2101;
int n, m, k;
int a[N], ans;
set<int> s;
int Sz, M;
unordered_map<int, vector<int> > g;
bool u[N];
int has[N];
void go(int v, int type = 0) {
  if (u[v]) return;
  u[v] = 1;
  if (has[v]) {
    go((M ^ v), 1);
  }
  if (type) {
    for (int i = n; i >= 0; i--) {
      if (v & (1 << i)) {
        go((v ^ (1 << i)), 1);
      }
    }
  }
}
inline void Solve() {
  cin >> n >> m;
  M = (1 << n) - 1;
  g.reserve(m + 1);
  for (int i = 1; i <= m; i++) {
    cin >> a[i];
    has[a[i]] = 1;
  }
  if (has[0]) {
    cout << 1;
    exit(0);
  }
  for (int i = 0; i < (1 << n); i++) {
    if (has[i] && !u[i]) {
      go(i);
      ++ans;
    }
  }
  cout << ans << '\n';
}
int main() {
  int tests = 1;
  ios_base::sync_with_stdio(0), cin.tie(0);
  while (tests--) {
    Solve();
  }
  return 0;
}
