#include <bits/stdc++.h>
using namespace std;
const int N = 23, M = 1 << N;
int n, m, ans, ALL, a[M];
bool p[M], vis[M];
void dfs(int x) {
  if (vis[x]) return;
  vis[x] = 1;
  for (int i = 0; i < n; i++)
    if ((1 << i) & x) dfs((1 << i) ^ x);
  if (p[x]) dfs(x ^ ALL);
}
int main() {
  cin >> n >> m;
  ALL = (1 << n) - 1;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &a[i]);
    p[a[i]] = 1;
  }
  for (int i = 1; i <= m; i++)
    if (!vis[a[i]]) ans++, dfs(ALL ^ a[i]);
  cout << ans;
  return 0;
}
