#include <bits/stdc++.h>
using namespace std;
int a[1 << 22], total, n, m;
bool v[1 << 22], p[1 << 22];
void dfs(int x) {
  v[x] = 1;
  for (int i = 0; i < n; i++)
    if ((x & (1 << i)) == 0 && !v[x | (1 << i)]) dfs(x | (1 << i));
  if (p[total ^ x] && !v[total ^ x]) dfs(total ^ x);
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  cin >> n >> m;
  total = (1 << n) - 1;
  for (int i = 1; i <= m; i++) {
    cin >> a[i];
    p[a[i]] = 1;
  }
  int ans = 0;
  for (int i = 1; i <= m; i++)
    if (!v[total ^ a[i]]) {
      ans++;
      if (!v[a[i]]) dfs(a[i]);
    }
  cout << ans << endl;
  return 0;
}
