#include <bits/stdc++.h>
using namespace std;
long long dp[1 << 22];
vector<int> L[42];
int viz[42], color[42];
int n, m, i, j, x, y, ok;
void dfs(int nod) {
  viz[nod] = 1;
  for (int i = 0; i < L[nod].size(); i++) {
    int vecin = L[nod][i];
    if (color[vecin] == -1)
      color[vecin] = 1 - color[nod];
    else {
      if (color[nod] == color[vecin]) ok = 1;
    }
    if (!viz[vecin]) dfs(vecin);
  }
}
int main() {
  cin >> n >> m;
  for (i = 1; i <= m; i++) {
    cin >> x >> y;
    L[x].push_back(y);
    L[y].push_back(x);
  }
  long long nr_012 = 1;
  for (i = 1; i <= n; i++) nr_012 *= 2;
  long long nr_0 = 1;
  for (int i = 1; i <= n; i++)
    if (L[i].empty()) nr_0 *= 2;
  long long nr_2 = nr_0;
  long long nr_1 = 1;
  memset(color, -1, sizeof color);
  int comp = 0;
  for (i = 1; i <= n; i++) {
    if (!viz[i]) {
      comp++;
      ok = 0;
      color[i] = 0;
      dfs(i);
      if (!ok)
        nr_1 *= 2;
      else {
        nr_1 = 0;
      }
    }
  }
  long long nr_02 = 1;
  for (i = 1; i <= comp; i++) nr_02 *= 2;
  int nr = n / 2;
  int nr2 = n - nr;
  for (int mask = 0; mask < (1 << nr); mask++) {
    int ok = 1;
    for (int bit = 0; bit < nr; bit++) {
      if (!(mask & (1 << bit))) continue;
      int nod = bit + 1;
      for (int i = 0; i < L[nod].size(); i++) {
        int vecin = L[nod][i];
        vecin--;
        if (mask & (1LL << vecin)) {
          ok = 0;
          break;
        }
      }
      if (!ok) break;
    }
    if (!ok) continue;
    long long mask2 = 0;
    for (int bit = 0; bit < nr; bit++) {
      if (!(mask & (1 << bit))) continue;
      int nod = bit + 1;
      for (int i = 0; i < L[nod].size(); i++) {
        int vecin = L[nod][i];
        vecin--;
        if (vecin >= nr) mask2 |= (1LL << vecin);
      }
    }
    int mask3 = 0;
    for (int bit = nr; bit < n; bit++)
      if (!(mask2 & (1LL << bit))) mask3 |= (1 << (bit - nr));
    dp[mask3]++;
  }
  for (int bit = 0; bit < nr2; bit++)
    for (int mask = (1 << nr2) - 1; mask >= 0; mask--) {
      if (mask & (1 << bit)) dp[mask ^ (1 << bit)] += dp[mask];
    }
  long long nr_01 = 0;
  for (int mask = 0; mask < (1 << nr2); mask++) {
    int ok = 1;
    for (int bit = 0; bit < nr2; bit++) {
      if (!(mask & (1 << bit))) continue;
      int nod = bit + nr + 1;
      for (int i = 0; i < L[nod].size(); i++) {
        int vecin = L[nod][i];
        vecin--;
        if (vecin >= nr) {
          if (mask & (1 << (vecin - nr))) {
            ok = 0;
            break;
          }
        }
      }
      if (!ok) break;
    }
    if (!ok) continue;
    nr_01 += dp[mask];
  }
  long long nr_12 = nr_01;
  long long nr_ = 0;
  if (!m) {
    long long val = 1;
    for (int i = 1; i <= n; i++)
      if (L[i].empty()) val *= 2;
    nr_ = val;
  }
  long long sol = nr_012 - nr_01 - nr_02 - nr_12 + nr_0 + nr_1 + nr_2 - nr_;
  cout << sol;
  return 0;
}
