#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  int mx = 1 << n;
  vector<bool> hascity(mx, false);
  for (int i = 0; i < m; i++) {
    int x;
    scanf("%d", &x);
    hascity[x] = true;
  }
  vector<bool> visited(mx, false);
  int ans = 0;
  for (int i = 0; i < mx; i++) {
    if (!(hascity[i] && !visited[i])) continue;
    visited[i] = true;
    queue<int> Q;
    Q.push(i);
    while (!Q.empty()) {
      int u = (mx - 1) ^ Q.front();
      Q.pop();
      if (visited[u]) continue;
      visited[u] = true;
      queue<int> K;
      K.push(u);
      while (!K.empty()) {
        int z = K.front();
        K.pop();
        if (hascity[z]) {
          Q.push(z);
        }
        for (int b = 0; b < n; b++) {
          if (!(z & (1 << b))) continue;
          int sub = z - (1 << b);
          if (visited[sub]) continue;
          visited[sub] = true;
          K.push(sub);
        }
      }
    }
    ans++;
  }
  printf("%d\n", ans);
  return 0;
}
