#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const double EPS = 1e-9;
const double PI = 3.14159265359;
vector<int> comp, used;
int color = 0, n, m;
void dfs(int s) {
  if (comp[s]) return;
  comp[s] = color;
  for (int i = 0; i < n; ++i) {
    if ((1 << i) & s) dfs((1 << i) ^ s);
  }
  if (used[s]) dfs((1 << n) - s - 1);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  comp.resize((1 << n), 0);
  used.resize((1 << n), 0);
  for (int i = 0; i < m; ++i) {
    int x;
    cin >> x;
    used[x] = 1;
  }
  for (int i = 0; i < (1 << n); ++i) {
    if (!comp[i] && used[i]) {
      ++color;
      dfs((1 << n) - i - 1);
    }
  }
  cout << color;
  return 0;
}
