#include <bits/stdc++.h>
using namespace std;
int n, m, a[4194305], cmp;
bool pass[4194305], had[4194305];
void dfs(int u) {
  pass[u] = 1;
  for (int i = 0; i < n; i++)
    if ((u >> i) & 1)
      if (!pass[u - (1 << i)]) dfs(u - (1 << i));
  if (had[u] && !pass[(1 << n) - 1 - u]) dfs((1 << n) - 1 - u);
}
signed main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> a[i];
    had[a[i]] = 1;
  }
  for (int i = 1; i <= m; i++)
    if (!pass[a[i]]) {
      dfs(a[i]);
      cmp++;
    }
  cout << cmp;
}
