#include <bits/stdc++.h>
using namespace std;
int N, M, K, L, Q;
int A[1 << 22];
bool chk[1 << 22];
bool visit[1 << 22];
void Solve1(int n);
void Solve2(int n);
void Solve1(int n) {
  if (visit[n]) return;
  visit[n] = 1;
  for (int i = 0; i < 22; i++) {
    if ((n >> i) & 1) {
      int go = n ^ (1 << i);
      Solve1(go);
    }
  }
  if (A[n]) Solve2(n);
}
void Solve2(int n) {
  if (chk[n]) return;
  chk[n] = 1;
  int inv = (1 << 22) - 1;
  inv ^= n;
  Solve1(inv);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    int a;
    cin >> a;
    A[a] = 1;
  }
  int ret = 0;
  for (int i = 0; i < (1 << 22); i++) {
    if (!A[i] || chk[i]) continue;
    Solve2(i);
    ret++;
  }
  cout << ret;
  cin >> N;
}
