#include <bits/stdc++.h>
using namespace std;
const int base = 23;
const int maxn = 1 << 23;
int vis[maxn], used[maxn], n, m;
void dfs(int val) {
  if (vis[val]) return;
  vis[val] = 1;
  for (int i = n - 1; i >= 0; i--)
    if ((val >> i) & 1) {
      dfs(val - (1 << i));
    }
  if (used[val]) {
    dfs((1 << n) - 1 - val);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int temp;
    scanf("%d", &temp);
    used[temp] = 1;
  }
  int ans = 0;
  for (int i = 0; i < (1 << n); i++) {
    if (used[i] && !vis[i]) {
      ans++;
      dfs((1 << n) - 1 - i);
    }
  }
  printf("%d\n", ans);
  return 0;
}
