#include <bits/stdc++.h>
using namespace std;
const int N = (1 << 22);
template <class T1, class T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &a) {
  return os << '(' << a.first << ", " << a.second << ')';
}
template <class T>
ostream &operator<<(ostream &os, const vector<T> &a) {
  os << '[';
  for (unsigned int i = 0; i < a.size(); i++)
    os << a[i] << (i < a.size() - 1 ? ", " : "");
  os << ']';
  return os;
}
int read() {
  int x;
  cin >> x;
  return x;
}
int bitlen, n;
int a[N];
bool visited[N];
bool exist[N];
int allOn;
void dfs(int u) {
  visited[u] = true;
  if (exist[u] && !visited[u ^ allOn]) dfs(u ^ allOn);
  for (int i = (int)0; i <= (int)bitlen - 1; i++) {
    if (((u >> i) & 1LL) && !visited[u ^ (1 << i)]) dfs(u ^ (1 << i));
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> bitlen >> n;
  for (int i = (int)1; i <= (int)n; i++) cin >> a[i], exist[a[i]] = true;
  allOn = (1 << bitlen) - 1;
  int ans = 0;
  for (int i = (int)1; i <= (int)n; i++) {
    if (!visited[a[i]]) {
      ans++;
      dfs(a[i] ^ allOn);
    }
  }
  cout << ans << '\n';
}
