#include <bits/stdc++.h>
using namespace std;
const int M = 1 << 22 | 1;
int n, m, A[M], up, ans;
int had[M], vis[M];
void find(int a) {
  if (vis[a]) return;
  vis[a] = 1;
  for (int i = a; i; i -= ((i) & (-(i)))) find(a ^ ((i) & (-(i))));
  if (had[a]) find(up ^ a);
}
int main() {
  scanf("%d%d", &n, &m);
  up = (1 << n) - 1;
  for (int i = 1; i <= m; i++) scanf("%d", &A[i]), had[A[i]] = 1;
  for (int i = 1; i <= m; i++) {
    if (!vis[A[i]]) {
      find(up ^ A[i]);
      ++ans;
    }
  }
  printf("%d\n", ans);
  return 0;
}
