#include <bits/stdc++.h>
using namespace std;
const int N = 1 << 23;
int f[N];
bool vis[N];
int cnt;
int bit[N];
int Find(int x) { return x == f[x] ? f[x] : f[x] = Find(f[x]); }
void Merge(int x, int y) {
  int fx = Find(x), fy = Find(y);
  if (fx == fy) return;
  f[fx] = fy;
  cnt--;
}
bool mark[N];
int a[N];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int mx = (1 << n) - 1;
  bit[0] = 1;
  for (int i = 1; i <= n; ++i) bit[i] = bit[i - 1] << 1;
  for (int i = 0; i <= mx; ++i) f[i] = i;
  for (int i = 0; i < m; ++i) {
    scanf("%d", &a[i]);
    vis[a[i]] = 1;
  }
  for (int i = 0; i <= mx; ++i) {
    for (int j = 0; j < n; ++j)
      if ((i & bit[j]) == 0) vis[i ^ bit[j]] |= vis[i];
  }
  int ans = 0;
  for (int i = mx; i >= 0; --i) {
    if (vis[i]) {
      if (vis[mx ^ i]) {
        mark[i] = 1;
        mark[mx ^ i] = 1;
        Merge(i, mx ^ i);
      }
    }
    if (mark[i]) {
      for (int j = 0; j < n; ++j)
        if (i & bit[j]) {
          if (vis[i ^ bit[j]]) {
            mark[i ^ bit[j]] = 1;
            Merge(i, i ^ bit[j]);
          }
        }
    }
  }
  for (int i = 0; i <= mx; ++i)
    if (mark[i] && vis[i] && (Find(i) == i)) ans++;
  for (int i = 0; i < m; ++i)
    if (!mark[a[i]]) ans++;
  printf("%d\n", ans);
  return 0;
}
