#include <bits/stdc++.h>
using namespace std;
const long long N = (1LL << 22) + 2;
long long n, m;
long long a[N];
bool vis[2][N];
void dfs(long long k, long long cur) {
  if (vis[cur][k]) return;
  vis[cur][k] = 1;
  if (cur == 1) return dfs(k, cur ^ 1);
  for (long long i = 0; i < n; i++) {
    if ((k & (1LL << i)) == 0) dfs(k | (1LL << i), 0);
  }
  dfs(((1LL << n) - 1) ^ k, 1);
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> m;
  for (long long i = 0; i < N; i++) vis[1][i] = 1;
  for (long long i = 1; i <= m; i++) {
    cin >> a[i];
    vis[1][a[i]] = 0;
  }
  long long ans = 0;
  for (long long i = 1; i <= m; i++) {
    if (vis[1][a[i]]) continue;
    ans++;
    dfs(a[i], 1);
  }
  cout << ans;
  return 0;
}
