#include <bits/stdc++.h>
using namespace std;
const int maxn = 1 << 22;
int n, m, cnt = 0;
bitset<maxn> mp, mark;
void DFS(int x) {
  if (mark[x]) return;
  mark[x] = 1;
  for (int i = 0; i < n; i++) {
    if (x & (1 << i)) {
      DFS(x ^ (1 << i));
    }
  }
  if (mp[x]) DFS((1 << n) - 1 - x);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    mp[x] = 1;
  }
  for (int i = 0; i < (1 << n); i++)
    if (mp[i] && mark[i] == 0) DFS(i), cnt++;
  cout << cnt;
}
