#include <bits/stdc++.h>
using namespace std;
vector<int> g[50];
long long binpow(long long a, long long b) {
  if (b == 0) return 1ll;
  long long s = binpow(a, b / 2);
  s *= s;
  if (b & 1) s *= a;
  return s;
}
vector<int> vr;
bool good;
int pr[50], rk[50];
bool mk[50];
void dfs(int v, int p) {
  mk[v] = 1;
  vr.push_back(v);
  for (auto it : g[v]) {
    if (it == p) continue;
    if (!mk[it]) {
      dfs(it, v);
      if (!good) return;
    } else if (int(vr.size()) & 1) {
      int j = int(vr.size()) - 1;
      while (vr[j] != it) j--;
      if ((int(vr.size()) - j) % 2 == 0) continue;
      good = 0;
      return;
    }
  }
  vr.pop_back();
  mk[v] = 0;
}
int n, m;
bool dvudol() {
  good = 1;
  for (int i = 1; i <= n; i++) dfs(i, -1);
  return good;
}
long long f[(1 << 21)];
long long calc() {
  vector<int> v1, v2;
  v1.clear();
  v2.clear();
  int md = n / 2;
  for (int i = 1; i <= md; i++) v1.push_back(i);
  for (int i = md + 1; i <= n; i++) v2.push_back(i);
  for (int msk = 0; msk < (1 << int(v1.size())); msk++) {
    bool mk[int(v2.size()) + 1];
    memset(mk, 0, sizeof mk);
    bool bad = 0;
    for (int i = 0; i < int(v1.size()) && !bad; i++)
      if ((1 << i) & msk)
        for (auto it : g[v1[i]])
          if (it <= md) {
            if (msk & (1 << (it - 1))) bad = 1;
          } else
            mk[it - md - 1] = 1;
    if (bad) continue;
    int nmsk = 0;
    for (int i = 0; i < int(v2.size()); i++)
      if (!mk[i]) nmsk |= (1 << i);
    f[nmsk]++;
  }
  for (int k = 0; k < int(v2.size()); k++)
    for (int msk = 0; msk < (1 << int(v2.size())); msk++)
      if ((1 << k) & msk) f[msk ^ (1 << k)] += f[msk];
  long long ans = 0;
  for (int msk = 0; msk < (1 << int(v2.size())); msk++) {
    bool bad = 0;
    for (int i = 0; i < int(v2.size()) && !bad; i++)
      if ((1 << i) & msk)
        for (auto it : g[v2[i]])
          if (it > md)
            if ((1 << (it - md - 1)) & msk) {
              bad = 1;
              break;
            }
    if (!bad) ans += f[msk];
  }
  return ans;
}
void make(int x) {
  pr[x] = x;
  rk[x] = 1;
}
int fnd(int x) {
  if (pr[x] != x) pr[x] = fnd(pr[x]);
  return pr[x];
}
void link(int a, int b) {
  if (rk[b] > rk[a]) swap(a, b);
  rk[a] += rk[b];
  pr[b] = a;
}
int main() {
  iostream::sync_with_stdio(0);
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  if (m == 0) {
    cout << 0 << '\n';
    exit(0);
  }
  for (int i = 1; i <= n; i++) make(i);
  long long c = n;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
    if (fnd(a) != fnd(b)) {
      c--;
      link(fnd(a), fnd(b));
    }
  }
  long long ans = binpow(2, n);
  long long kol = 0;
  for (int i = 1; i <= n; i++)
    if (int(g[i].size()) == 0) kol++;
  ans += 2 * binpow(2, kol);
  if (dvudol()) ans += binpow(2, c);
  ans -= binpow(2, c);
  ans -= 2 * calc();
  cout << ans << '\n';
}
