#include <bits/stdc++.h>
using namespace std;
const long long N = (1 << 23);
long long n, m, ans = 0, arr[N];
vector<bool> visited(N, false);
vector<bool> present(N, false);
void dfs(long long ele) {
  if (visited[ele]) return;
  visited[ele] = true;
  for (long long i = 0; i < n; i++)
    if (ele & (1 << i)) dfs(ele ^ (1 << i));
  if (present[ele]) dfs(ele ^ ((1 << n) - 1));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m;
  for (long long i = 0; i < m; i++) {
    cin >> arr[i];
    present[arr[i]] = true;
  }
  for (long long i = 0; i < m; i++)
    if (!visited[arr[i]]) dfs(arr[i]), ans++;
  cout << ans;
}
