#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
const int N = 1e5 + 10;
const int MAX = 1e9 + 1;
int n, m;
vector<int> vec;
bool num[1 << 22];
bool vis[1 << 22];
void dfs(int x) {
  if (vis[x]) return;
  vis[x] = 1;
  if (num[x]) {
    dfs(((1 << n) - 1) & ~x);
  }
  for (int i = 1; i < (1 << n); i <<= 1) {
    if (x & i) {
      dfs(x & ~i);
    }
  }
}
int main() {
  int i, j;
  cin >> n >> m;
  for (i = 0; i < m; ++i) {
    int t;
    scanf("%d", &t);
    vec.push_back(t);
    num[t] = 1;
  }
  int cnt = 0;
  for (i = 0; i < vec.size(); ++i) {
    if (!vis[vec[i]]) {
      ++cnt;
      vis[vec[i]] = 1;
      dfs(((1 << n) - 1) & (~vec[i]));
    }
  }
  cout << cnt << endl;
  return 0;
}
