#include <bits/stdc++.h>
using namespace std;
bool vis[4200000] = {0};
bool flag[4200000];
int n, x, m;
queue<pair<int, bool> > q;
void reset() {}
void input() {
  cin >> n >> m;
  for (long long(i) = (1); (i) <= (m); (i)++) {
    cin >> x;
    flag[x] = true;
  }
}
int invert(int val) { return (1LL << n) - 1 - val; }
void bfs(int now) {
  bool inv;
  q.push({now, false});
  while (!q.empty()) {
    now = q.front().first;
    inv = q.front().second;
    vis[now] = true;
    q.pop();
    if (inv == false) {
      if (vis[invert(now)] == false) {
        vis[invert(now)] = true;
        q.push({invert(now), true});
      }
    } else {
      if (flag[now] == true && vis[invert(now)] == false) {
        vis[now] = true;
        vis[invert(now)] = true;
        q.push({invert(now), true});
      }
      for (long long(i) = (0); (i) < (n); (i)++) {
        if (now & (1LL << i)) {
          if (vis[(now ^ (1LL << i))] == false) {
            vis[(now ^ (1LL << i))] = true;
            q.push({(now ^ (1LL << i)), true});
          }
        }
      }
    }
  }
}
void solve() {
  int ans = 0;
  for (long long(i) = (0); (i) < (1LL << n); (i)++) {
    if (flag[i] && vis[i] == false) {
      ans++;
      bfs(i);
    }
  }
  cout << ans << endl;
}
void LetsRock() { solve(); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  reset();
  input();
  LetsRock();
  return 0;
}
