#include <bits/stdc++.h>
using namespace std;
int const N = 1 << 22;
int n, m;
int pick[N], use[N], que[N], inv[N];
int main() {
  cin >> n >> m;
  memset(pick, -1, sizeof(pick));
  for (int i = 1; i <= m; i++) {
    int u;
    scanf("%d", &u);
    pick[u] = 0;
  }
  int ans = 0;
  for (int i = 0; i < (1 << n); i++) {
    if (pick[i] == -1) {
      continue;
    }
    ans++;
    int sizeQue = 0;
    pick[i] = -1;
    que[sizeQue++] = i;
    for (int q = 0; q < sizeQue; q++) {
      int u = (1 << n) - 1 - que[q];
      if (use[u]) continue;
      use[u] = 1;
      int sizeInv = 0;
      inv[sizeInv++] = u;
      for (int p = 0; p < sizeInv; p++) {
        int cur = inv[p];
        if (pick[cur] == 0) {
          pick[cur] = -1;
          que[sizeQue++] = cur;
        }
        for (int j = 0; j < n; j++) {
          if ((cur >> j) & 1) {
            int nextCur = cur ^ (1 << j);
            if (use[nextCur]) continue;
            use[nextCur] = 1;
            inv[sizeInv++] = nextCur;
          }
        }
      }
    }
  }
  cout << ans;
}
