#include <bits/stdc++.h>
using namespace std;
class DebugStream {
} LOG;
template <typename T>
DebugStream& operator<<(DebugStream& s, const T&) {
  return s;
}
mt19937 rnd(time(NULL));
const int maxN = 42, maxV = 1e6 + 9, MOD = 199, SQ = 335, lg = 20, bs = 29;
int adjmat[maxN][maxN], n, m;
void delNd(int w, map<int, set<int>>& adj) {
  for (auto& el : adj) el.second.erase(w);
  adj.erase(w);
}
void dfs(int nd, map<int, set<int>>& adj, map<int, set<int>>& nw) {
  nw[nd] = adj[nd];
  adj.erase(nd);
  for (auto el : nw[nd])
    if (nw.find(el) == nw.end()) dfs(el, adj, nw);
}
long long separ(map<int, set<int>> adj);
long long compo(map<int, set<int>> adj) {
  int beste = max_element(adj.begin(), adj.end(),
                          [](const pair<int, set<int>>& a,
                             const pair<int, set<int>>& b) {
                            return a.second.size() < b.second.size();
                          })
                  ->first;
  set<int> mp = adj[beste];
  delNd(beste, adj);
  long long uno = separ(adj);
  for (auto el : mp) delNd(el, adj);
  return uno + separ(adj);
}
long long separ(map<int, set<int>> adj) {
  map<int, set<int>> nw;
  long long ret = 1;
  while (adj.size()) {
    dfs(adj.begin()->first, adj, nw);
    ret *= compo(nw);
    nw.clear();
  }
  return ret;
}
int sd[maxN];
bool isbip(int nd, map<int, set<int>>& adj) {
  auto tmp = adj[nd];
  adj.erase(nd);
  for (auto el : tmp)
    if (adj.find(el) == adj.end()) {
      if (sd[el] == sd[nd]) return false;
    } else {
      sd[el] = sd[nd] ^ 1;
      if (!isbip(el, adj)) return false;
    }
  return true;
}
void solveOtros(long long& uno, long long& cerodos, map<int, set<int>> adj) {
  cerodos = uno = 1;
  map<int, set<int>> nw;
  long long ret = 1;
  while (adj.size()) {
    dfs(adj.begin()->first, adj, nw);
    cerodos *= 2;
    if (!isbip(nw.begin()->first, nw))
      uno = 0;
    else
      uno *= 2;
    nw.clear();
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  map<int, set<int>> ori;
  cin >> n >> m;
  for (int i = 0, u, v; i < m; i++) {
    cin >> u >> v;
    u--, v--;
    ori[u].insert(v);
    ori[v].insert(u);
  }
  int singles = 0;
  for (int i = 0; i < n; i++)
    if (ori.find(i) == ori.end()) singles++;
  LOG << singles << '\n';
  long long cero = 1;
  long long dos = 1;
  long long uno;
  long long unodos = separ(ori);
  long long unocero = unodos;
  long long cerodos;
  solveOtros(uno, cerodos, ori);
  LOG << unodos << ' ' << unocero << ' ' << cerodos << ' ' << uno << ' ' << dos
      << ' ' << cero << '\n';
  long long malos = unodos + unocero + cerodos - uno - dos - cero;
  long long buenos = 1LL << (n - singles);
  if (singles == n) buenos = 0;
  LOG << buenos << ' ' << malos << '\n';
  buenos -= malos;
  LOG << buenos << '\n';
  long long ans = buenos << singles;
  cout << ans << '\n';
}
