#include <bits/stdc++.h>
using namespace std;
const int N = (1 << 22) + 100;
int n, m, a[N], ans;
bool vis[N][2], ok[N];
void dfs(int x, int type) {
  vis[x][type] = true;
  if (type == 0 && ok[x] && !vis[x][1]) dfs(x, 1);
  if (type == 1) {
    for (int k = 0; k < n; k++)
      if ((x & (1 << k)) == 0 && !vis[x | (1 << k)][1]) dfs(x | (1 << k), 1);
    if (ok[(1 << n) - 1 - x] && !vis[(1 << n) - 1 - x][0])
      dfs((1 << n) - 1 - x, 0);
  }
}
int main() {
  scanf("%d %d ", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d ", &a[i]);
    ok[a[i]] = true;
  }
  for (int i = 1; i <= m; i++)
    if (!vis[a[i]][0]) {
      dfs(a[i], 0);
      ans++;
    }
  cout << ans;
}
