#include <bits/stdc++.h>
using namespace std;
long long int cons;
long long int check(long long int a) {
  if (a >= cons) a %= cons;
  return a;
}
long long int check2(long long int a) {
  a %= cons;
  if (a < 0) a += cons;
  return a;
}
long long int fast_check(long long int a) {
  if (a >= cons) a -= cons;
  return a;
}
long long int GCD(long long int a, long long int b) {
  while (a && b) {
    a = a % b;
    if (a != 0) b = b % a;
  }
  return a + b;
}
long long int exp(long long int a, long long int n) {
  long long int ans = 1;
  a = check(a);
  while (n) {
    if (n & 1) ans = check(ans * a);
    a = check(a * a);
    n = (n >> 1);
  }
  return ans;
}
void print_pair(pair<int, int> p) {
  cout << p.first << " " << p.second << endl;
}
const int N = (1 << 22);
bool isqueue[N];
bool subsetqueue[N];
bool ispresent[N];
int n, m;
int mask;
int getComplement(int i) { return (~i) & mask; }
void bfs(int element) {
  queue<int> q;
  q.push(element);
  isqueue[element] = true;
  while (!q.empty()) {
    auto itr = q.front();
    q.pop();
    int neg = getComplement(itr);
    queue<int> q2;
    q2.push(neg);
    subsetqueue[neg] = true;
    if (ispresent[neg] && (!isqueue[neg])) {
      isqueue[neg] = true;
      q.push(neg);
    }
    while (!q2.empty()) {
      auto itr2 = q2.front();
      q2.pop();
      for (int j = 0; j < n; j++) {
        int temp = itr2 ^ (1 << j);
        if ((itr2 & (1 << j)) && !subsetqueue[temp]) {
          subsetqueue[temp] = true;
          q2.push(temp);
          if (!isqueue[temp] && ispresent[temp]) {
            q.push(temp);
            isqueue[temp] = true;
          }
        }
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cons = 1e9 + 7;
  cin >> n >> m;
  mask = (1 << n) - 1;
  int components = 0;
  vector<int> elements;
  elements.resize(m);
  for (int i = 0; i < m; i++) {
    cin >> elements[i];
    ispresent[elements[i]] = true;
  }
  for (int i = 0; i < m; i++) {
    if (!isqueue[elements[i]]) {
      components++;
      bfs(elements[i]);
    }
  }
  cout << components;
}
