#include <bits/stdc++.h>
using namespace std;
template <typename T>
struct outputer;
struct outputable {};
template <typename T>
inline auto sqr(T x) -> decltype(x * x) {
  return x * x;
}
template <typename T1, typename T2>
inline bool umx(T1& a, T2 b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T1, typename T2>
inline bool umn(T1& a, T2 b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const int N = 22;
struct Input {
  int n;
  bool have[1 << N];
  bool read() {
    int m;
    if (!(cin >> n >> m)) {
      return 0;
    }
    memset(have, 0, sizeof have);
    for (int i = int(0); i < int(m); ++i) {
      int a;
      scanf("%d", &a);
      have[a] = 1;
    }
    return 1;
  }
  void init(const Input& input) { *this = input; }
};
struct Data : Input {
  int ans;
  void write() { cout << ans << endl; }
};
namespace Main {
struct Solution : Data {
  bool u0[1 << N], u1[1 << N];
  void dfs0(int v) {
    if (u0[v]) {
      return;
    }
    u0[v] = 1;
    dfs1((1 << n) - 1 - v);
  }
  void dfs1(int v) {
    if (u1[v]) {
      return;
    }
    u1[v] = 1;
    if (have[v]) {
      dfs0(v);
    }
    for (int i = int(0); i < int(n); ++i) {
      if (v & (1 << i)) {
        dfs1(v - (1 << i));
      }
    }
  }
  void solve() {
    memset(u0, 0, sizeof u0);
    memset(u1, 0, sizeof u1);
    ans = 0;
    for (int i = int(0); i < int(1 << n); ++i) {
      if (have[i] && !u0[i]) {
        dfs0(i);
        ans++;
      }
    }
  }
  void clear() { *this = Solution(); }
};
}  // namespace Main
Main::Solution sol;
int main() {
  cout.setf(ios::showpoint | ios::fixed);
  cout.precision(20);
  sol.read();
  sol.solve();
  sol.write();
  return 0;
}
