#include <bits/stdc++.h>
using namespace std;
const int N = (1 << 22) + 100;
int n, m, a[N], ans;
bitset<N> vis[24], in;
void dfs(int u, int t) {
  if (t == n && !in[u]) return;
  vis[t][u] = 1;
  if (t == n) {
    int v = (1 << n) - 1 - u;
    if (!vis[0][v]) dfs(v, 0);
    return;
  }
  for (; t < n; t++)
    if ((u & (1 << t)) && !vis[t + 1][u - (1 << t)]) dfs(u - (1 << t), t + 1);
  if (!vis[n][u]) dfs(u, n);
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) scanf("%d", &a[i]), in[a[i]] = 1;
  for (int i = 1; i <= m; i++)
    if (!vis[n][a[i]]) ans++, dfs(a[i], n);
  cout << ans;
}
