#include <bits/stdc++.h>
using namespace std;
const int inf = 2e9;
const long double eps = 0.000001;
const long long mod = 1e9 + 7;
const long double PI = 3.14159265359;
int n, m;
vector<vector<int>> visited;
vector<int> a;
vector<bool> edgeTo1;
int complement(int x) { return (1 << n) - 1 - x; }
void dfs(int v, int type) {
  visited[v][type] = true;
  if (type == 0 && !visited[v][1]) {
    dfs(v, 1);
  }
  if (type == 1) {
    for (int i = 0; i < n; i++) {
      int to = v | (1 << i);
      if (to == v || visited[to][1]) continue;
      dfs(to, 1);
    }
  }
  if (type == 1 && edgeTo1[v] && !visited[complement(v)][0]) {
    dfs(complement(v), 0);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> n >> m;
  a.resize(m);
  edgeTo1.resize((1 << n), false);
  for (int i = 0; i < m; i++) {
    cin >> a[i];
    edgeTo1[complement(a[i])] = true;
  }
  int cnt = 0;
  visited.resize((1 << n), vector<int>(2, false));
  for (auto ai : a) {
    if (visited[ai][0]) continue;
    cnt++;
    dfs(ai, 0);
  }
  cout << cnt;
}
