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