#include <bits/stdc++.h>
using namespace std;
const int N = 5e6 + 5;
int a[N];
int vis[N];
int iso[N];
int n, m;
int up;
int c[23];
void init() {
  c[0] = 1;
  for (int i = 1; i <= 22; i++) c[i] = c[i - 1] << 1;
  up = (1 << n) - 1;
}
void dfs(int num) {
  if (vis[num]) return;
  vis[num] = 1;
  if (iso[num]) dfs(num ^ up);
  for (int i = 0; i <= n; i++)
    if (c[i] & num) {
      dfs(c[i] ^ num);
    }
}
int main() {
  scanf("%d %d", &n, &m);
  init();
  for (int i = 1; i <= m; i++) {
    scanf("%d", &a[i]);
    iso[a[i]] = 1;
  }
  int ans = 0;
  for (int i = 1; i <= m; i++) {
    if (!vis[a[i]]) {
      ans++;
      vis[a[i]] = 1;
      dfs(up ^ a[i]);
    }
  }
  cout << ans << endl;
  return 0;
}
