#include <bits/stdc++.h>
using namespace std;
const long long maxn = 5000909;
const long long maxN = 2e6 + 5;
const long long oo = 1e18;
const long long mod = 1e9 + 7;
long long used[maxn], used1[maxn];
long long a[maxn], n, m;
long long ans = 0;
void dfs(long long u) {
  used1[u] = 1;
  for (long long i = 0; i < n; i++) {
    if (!used1[((1 << i) ^ u)] && ((1 << i) & u)) {
      dfs(((1 << i) ^ u));
    }
  }
  if (used[u] == 1 && used1[((1 << n) - 1 - u)] == 0) dfs(((1 << n) - 1 - u));
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m;
  for (long long i = 1; i <= m; i++) {
    cin >> a[i];
    used[a[i]] = 1;
  }
  for (long long i = 1; i <= m; i++) {
    if (!used1[a[i]]) {
      dfs(a[i]);
      ans++;
    }
  }
  cout << ans;
}
