#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
template <typename T>
T gcd(T a, T b) {
  T m;
  while (b != T(0)) {
    m = a % b;
    a = b;
    b = m;
  }
  return a;
}
template <typename T>
T lcm(T a, T b) {
  return a == 0 && b == 0 ? 0 : (a / gcd(a, b)) * b;
}
int const MAXN = 1 << 22;
int const MOD = 1000000000 + 7;
int N, M, SH;
int cnt[MAXN];
int vis[MAXN];
void dfs(int x, int t) {
  vis[x] = 1;
  if (cnt[x]) {
    if (!vis[x ^ SH]) {
      dfs(x ^ SH, 1);
      dfs(x ^ SH, 0);
    }
  }
  if (t) {
    for (int i = 0; i < N; ++i) {
      if (x & (1 << i))
        if (!vis[x ^ (1 << i)]) dfs(x ^ (1 << i), 1);
    }
  }
}
static int solve() {
  scanf("%d%d", &N, &M);
  for (int i = 0; i < M; ++i) {
    int a;
    scanf("%d", &a);
    cnt[a]++;
  }
  int ans = 0;
  SH = (1 << N) - 1;
  for (int i = 0; i <= SH; ++i) {
    if (!vis[i] && cnt[i] > 0) {
      dfs(i, 0);
      ++ans;
    }
  }
  printf("%d\n", ans);
  return 0;
}
int main(int argc, char* argv[]) {
  ::std::ios::sync_with_stdio(false);
  ::std::cin.tie(0);
  ::std::cout.tie(0);
  solve();
  return 0;
}
