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