#include <bits/stdc++.h>
using namespace std;
int N, M;
int basura = 0;
bool memo[9000000];
bool input[9000000];
void dfs(int pos) {
  if (!pos) return;
  if (memo[pos]) return;
  memo[pos] = true;
  if (input[pos]) dfs(basura ^ pos);
  for (int i = 0; i <= N; i++) {
    if (pos & (1 << i)) {
      dfs(pos - (1 << i));
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> N >> M;
  for (int i = 0; i < N; i++) {
    basura++;
    basura *= 2;
  }
  basura++;
  int tmp, maxi = 0;
  for (int i = 0; i < M; i++) {
    cin >> tmp;
    input[tmp] = true;
    maxi = max(maxi, tmp);
  }
  int res = 0;
  for (int i = 0; i <= maxi; i++) {
    if (input[i] && memo[i] == false) {
      res++;
      dfs(basura ^ i);
    }
  }
  cout << res;
  return 0;
}
