#include <bits/stdc++.h>
using namespace std;
const int dir[8][2] = {{0, 1}, {1, 0},  {0, -1},  {-1, 0},
                       {1, 1}, {1, -1}, {-1, -1}, {-1, 1}};
const int mod = 1e9 + 7;
const int gakki = 5 + 2 + 1 + 19880611 + 1e9;
const int N = (1 << 22) + 5;
int n, m, now;
int anser;
bool num[N], vis[N];
void dfs(int x) {
  if (vis[x]) {
    return;
  }
  vis[x] = true;
  for (int i = 0; i < n; i++)
    if (x & (1 << i)) {
      dfs(x ^ (1 << i));
    }
  if (num[x]) {
    dfs((1 << n) - 1 - x);
  }
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &now);
    num[now] = true;
  }
  for (int i = (1 << n) - 1; i >= 0; i--)
    if (!vis[i] && num[i]) {
      anser++;
      dfs((1 << n) - 1 - i);
    }
  cout << anser << endl;
  return 0;
}
