#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9, maxn = (1 << 23) + 123, N = 1e5 + 20, LOG = 20,
          mod = 1e9 + 7;
const int dx[] = {0, 0, -1, 1}, dy[] = {1, -1, 0, 0};
const long double eps = 1e-12, pi = 3.14159265359;
const pair<unsigned long long, unsigned long long> base = make_pair(127, 137);
const long long INF = 1e18;
bool used[maxn], was[maxn];
int n, m, x, ans;
void solve(int x) {
  vector<int> v;
  v.push_back(x);
  used[x] = 1;
  int cur = -1;
  while (++cur < v.size()) {
    x = v[cur];
    if (x < (1 << n)) {
      if (!used[x + (1 << n)]) {
        used[x + (1 << n)] = 1;
        v.push_back(x + (1 << n));
      }
    } else {
      int y = (1 << (n + 1)) - x - 1;
      if (!used[y] && was[y]) {
        used[y] = 1;
        v.push_back(y);
      }
      for (int i = 0; i < n; ++i) {
        y = (x | (1 << i));
        if (!used[y]) {
          used[y] = 1;
          v.push_back(y);
        }
      }
    }
  }
}
int main() {
  cin >> n >> m;
  while (m--) {
    cin >> x;
    was[x] = 1;
  }
  for (int i = 0; i < (1 << n); ++i)
    if (was[i] && !used[i]) {
      solve(i);
      ans++;
    }
  cout << ans << '\n';
  return 0;
}
