#include <bits/stdc++.h>
#pragma GCC optimize("O3", "unroll-loops")
using namespace std;
template <class T, class U>
inline void checkmin(T &x, U y) {
  if (y < x) x = y;
}
template <class T, class U>
inline void checkmax(T &x, U y) {
  if (y > x) x = y;
}
template <class T, class U>
inline bool ifmin(T &x, U y) {
  if (y < x) return x = y, true;
  return false;
}
template <class T, class U>
inline bool ifmax(T &x, U y) {
  if (y > x) return x = y, true;
  return false;
}
template <class T>
inline void sort(T &a) {
  sort(a.begin(), a.end());
}
template <class T>
inline void rsort(T &a) {
  sort(a.rbegin(), a.rend());
}
template <class T>
inline void reverse(T &a) {
  reverse(a.begin(), a.end());
}
template <class T>
inline istream &operator>>(istream &stream, vector<T> &a) {
  for (auto &i : a) stream >> i;
  return stream;
}
vector<int> G;
int n, m;
int mx, allone;
vector<bool> used;
void dfs(int v) {
  if (v < 0 || used[v]) return;
  used[v] = true;
  if (v >= mx)
    for (int i = 0; i < n; ++i) dfs(v | (1 << i));
  dfs(G[v]);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(15);
  srand(85453532);
  cin >> n >> m;
  vector<int> arr(m);
  cin >> arr;
  mx = 1 << n;
  allone = mx - 1;
  G.resize(2 * mx, -1);
  for (auto i : arr) {
    G[i] = i + mx;
    G[(i ^ allone) + mx] = i;
  }
  used.resize(2 * mx);
  int ans = 0;
  for (auto i : arr)
    if (!used[i]) dfs(i), ++ans;
  cout << ans;
  return 0;
}
