#include <bits/stdc++.h>
using namespace std;
int n, m;
int fb, mx;
bool* iig;
bool* vis;
void dfs(int cl) {
  if (vis[cl]) {
    return;
  }
  vis[cl] = 1;
  if (cl >= mx) {
    dfs(cl - mx);
    return;
  }
  for (int i = 0; i < n; i++) {
    dfs(cl | (1 << i));
  }
  cl = cl ^ fb;
  if (iig[cl]) {
    dfs(cl + mx);
  }
}
int main() {
  cin.sync_with_stdio(0);
  cin >> n >> m;
  mx = 1 << n;
  int gs = mx * 2;
  fb = mx - 1;
  iig = new bool[mx];
  vis = new bool[gs];
  for (int i = 0; i < gs; i++) {
    vis[i] = 0;
  }
  for (int i = 0; i < mx; i++) {
    iig[i] = 0;
  }
  int* gn = new int[m];
  for (int i = 0; i < m; i++) {
    cin >> gn[i];
    iig[gn[i]] = 1;
  }
  int vas = 0;
  for (int i = 0; i < m; i++) {
    if (vis[gn[i] + mx]) {
      continue;
    }
    vas++;
    dfs(gn[i] + mx);
  }
  cout << vas << endl;
  cin >> vas;
}
