#include <bits/stdc++.h>
using namespace std;
int n, m, a[5000015], c;
bool vis[9000015];
int nex[9000015];
void dfs(int x) {
  vis[x] = 1;
  if (~nex[x] && !vis[nex[x]]) dfs(nex[x]);
  if (c <= x) {
    x -= c;
    int p = x;
    for (; p; p -= p & -p) {
      int y = x - (p & -p) + c;
      if (!vis[y]) dfs(y);
    }
  }
}
int main() {
  int i;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= m; ++i) scanf("%d", &a[i]);
  c = 1 << n;
  memset(nex, 255, sizeof(nex));
  for (i = 1; i <= m; ++i) {
    nex[a[i]] = 2 * c - 1 - a[i];
    nex[a[i] + c] = a[i];
  }
  int cnt = 0;
  for (i = 1; i <= m; ++i) {
    if (!vis[a[i]]) {
      ++cnt;
      dfs(a[i]);
    }
  }
  printf("%d\n", cnt);
  return 0;
}
