#include <bits/stdc++.h>
using namespace std;
const int N = 1 << 22;
bool vis[N + 105];
int test = 0;
int dp[N + 105];
int n, m;
void dfs(int x) {
  dp[x] = true;
  for (int i = 0; i < n; i++) {
    if (dp[x | (1 << i)] == false) {
      dfs(x | (1 << i));
    }
  }
  if (vis[x ^ test] && dp[x ^ test] == false) dfs(x ^ test);
}
int main() {
  int ans = 0;
  cin >> n >> m;
  for (int i = 0; i < n; i++) test += 1 << i;
  for (int i = 1; i <= m; i++) {
    int now;
    scanf("%d", &now);
    vis[now] = true;
  }
  for (int i = 0; i < (1 << n); i++) {
    if (vis[i] == true) {
      if (dp[i ^ test])
        continue;
      else {
        dfs(i);
        ans++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
