#include <bits/stdc++.h>
using namespace std;
const int N = 1 << 22;
bool visit[2][N];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < N; i++) {
    visit[0][i] = 1;
  }
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    visit[0][x] = 0;
  }
  int ans = 0;
  for (int i = 0; i < (1 << n); i++) {
    if (visit[0][i]) continue;
    visit[0][i] = 1;
    ans++;
    if (!visit[1][i]) {
      visit[1][i] = 1;
      queue<int> q;
      q.push(i);
      while (q.size()) {
        int v = q.front();
        q.pop();
        if (visit[0][(1 << n) - v - 1] == 0) {
          visit[0][(1 << n) - v - 1] = 1;
          visit[1][(1 << n) - v - 1] = 1;
          q.push((1 << n) - v - 1);
        }
        for (int j = 0; j < n; j++) {
          if ((v & (1 << j)) == 0 && !visit[1][v | (1 << j)]) {
            q.push(v | (1 << j));
            visit[1][v | (1 << j)] = 1;
          }
        }
      }
    }
  }
  cout << ans << '\n';
  return 0;
}
