#include <bits/stdc++.h>
using namespace std;
bool exi[(1 << 22) + 4];
bool vis[(1 << 22) + 4][2];
int ans, hg, n, m, arr[(1 << 22) + 4];
void dfs(int a, int b) {
  vis[a][b] = 1;
  if (!b && !vis[a][1]) dfs(a, 1);
  int k = 1;
  for (long long j = 0; j < n; ++j) {
    if (!(a & k)) {
      int g = (a | k);
      if (b && !vis[g][1]) dfs(g, 1);
    }
    k <<= 1;
  }
  if (b && exi[hg - a] && !vis[hg - a][0]) dfs(hg - a, 0);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  hg = (1 << n) - 1;
  for (long long i = 0; i < m; ++i) {
    cin >> arr[i];
    exi[arr[i]] = 1;
  }
  for (long long i = 0; i < m; ++i) {
    if (!vis[arr[i]][0]) {
      ++ans;
      dfs(arr[i], 0);
    }
  }
  cout << ans;
}
