#include <bits/stdc++.h>
using namespace std;
const int N = 5e6 + 50;
vector<int> v;
int vis[N] = {0}, n;
int flag[N] = {0}, ans = 0;
void dfs(int k) {
  if (vis[k]) return;
  vis[k] = 1;
  if (flag[k]) dfs(k ^ ((1 << n) - 1));
  for (int i = 0; i < n; i++)
    if ((1 << i) & k) dfs(k ^ (1 << i));
}
int main() {
  int m;
  scanf("%d %d", &n, &m);
  int temp;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &temp);
    v.push_back(temp);
    flag[temp] = 1;
  }
  for (auto vv : v) {
    if (!vis[vv]) {
      ans++;
      vis[vv] = 1;
      dfs(vv ^ ((1 << n) - 1));
    }
  }
  printf("%d\n", ans);
}
