#include <bits/stdc++.h>
using namespace std;
const int N = (1 << 23) + 5;
int flag[N], a[N], vis[N], n, m;
void dfs(int x) {
  if (vis[x]) return;
  vis[x] = 1;
  if (flag[x]) dfs((1 << n) - 1 - x);
  for (int i = 1; i <= n; i++)
    if (x & (1 << (i - 1))) dfs(x ^ (1 << (i - 1)));
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) scanf("%d", &a[i]), flag[a[i]] = 1;
  int ans = 0;
  for (int i = 0; i < (1 << n); i++)
    if (flag[i] && !vis[i]) {
      vis[i] = 1;
      dfs((1 << n) - 1 - i);
      ans++;
    }
  cout << ans << endl;
  return 0;
}
