#include <bits/stdc++.h>
using namespace std;
int n, m, total;
int arr[1 << 22], p[1 << 22], v[1 << 22];
inline void DFS(int x) {
  v[x] = 1;
  for (int i = 0; i < n; ++i) {
    if ((x & (1 << i)) == 0 && !v[x | (1 << i)]) DFS(x | (1 << i));
  }
  if (p[total ^ x] && !v[total ^ x]) DFS(total ^ x);
}
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    total = (1 << n) - 1;
    for (int i = 1; i <= m; ++i) {
      scanf("%d", arr + i);
      p[arr[i]] = 1;
    }
    sort(arr + 1, arr + 1 + m);
    int ans = 0;
    for (int i = 1; i <= m; ++i) {
      if (!v[total ^ arr[i]]) {
        ans++;
        if (!v[arr[i]]) DFS(arr[i]);
      }
    }
    cout << ans << "\n";
  }
}
