#include <bits/stdc++.h>
using namespace std;
class Solution {
 public:
  Solution(int n, vector<vector<int>> const& adj) : _n(n), _adj(adj) {}
  long long solve() {
    compute_components();
    long long all_colorings = 1LL << _n;
    long long no_zeroes = independent_sets();
    long long no_ones = 1LL << _c.size();
    long long no_twos = no_zeroes;
    long long only_zeroes = 1LL << zero_degree();
    long long only_ones = (long long)_b << _c.size();
    long long only_twos = only_zeroes;
    long long no_edges = _c.size() < _n ? 0 : all_colorings;
    return all_colorings - no_zeroes - no_ones - no_twos + only_zeroes +
           only_ones + only_twos - no_edges;
  }

 private:
  void compute_components() {
    _b = 1;
    vector<int> t(_n, -1);
    for (int i = 0; i < _n; ++i) {
      if (t[i] >= 0) continue;
      queue<int> q;
      q.push(i);
      t[i] = 0;
      _c.emplace_back();
      while (!q.empty()) {
        int u = q.front();
        q.pop();
        _c.back().push_back(u);
        for (int v : _adj[u]) {
          if (t[v] >= 0) {
            _b &= t[u] ^ t[v];
            continue;
          }
          t[v] = t[u] ^ 1;
          q.push(v);
        }
      }
    }
  }
  int zero_degree() {
    int r = 0;
    for (int i = 0; i < _n; ++i)
      if (_adj[i].empty()) ++r;
    return r;
  }
  long long independent_sets() {
    long long r = 1LL;
    for (const auto& c : _c) r *= independent_sets(c);
    return r;
  }
  long long independent_sets(vector<int> const& c) {
    int n = c.size();
    if (n <= 1) return 1 << n;
    int n1 = n >> 1;
    int n2 = n - n1;
    unordered_map<int, int> cc;
    for (int i = 0; i < n; ++i) cc[c[i]] = i;
    vector<int> m1(n1, 0), m2(n2, 0), x(n1, 0);
    for (int i = 0; i < n; ++i) {
      int u = c[i];
      for (int v : _adj[u]) {
        int j = cc[v];
        if (i < n1 && j < n1)
          m1[i] |= 1 << j;
        else if (i >= n1 && j >= n1)
          m2[i - n1] |= 1 << (j - n1);
        else if (i < n1 && j >= n1)
          x[i] |= 1 << (j - n1);
      }
    }
    vector<int> w(1 << n2, 0);
    for (int i = 0; i < 1 << n1; ++i) {
      bool ok = 1;
      for (int j = 0; j < n1; ++j) {
        if (i & (1 << j) && i & m1[j]) {
          ok = 0;
          break;
        }
      }
      if (!ok) continue;
      int k = 0;
      for (int j = 0; j < n1; ++j) {
        if (i & (1 << j)) k |= x[j];
      }
      ++w[k];
    }
    for (int j = 0; j < n2; ++j) {
      for (int i = 0; i < 1 << n2; ++i) {
        if (i & (1 << j)) continue;
        w[i | (1 << j)] += w[i];
      }
    }
    int m = (1 << n2) - 1;
    long long r = 0;
    for (int i = 0; i < 1 << n2; ++i) {
      bool ok = 1;
      for (int j = 0; j < n2; ++j) {
        if (i & (1 << j) && i & m2[j]) {
          ok = 0;
          break;
        }
      }
      if (ok) r += w[m ^ i];
    }
    return r;
  }

 private:
  int _n, _b;
  vector<vector<int>> _c;
  vector<vector<int>> const& _adj;
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<vector<int>> adj(n);
  while (m--) {
    int x, y;
    cin >> x >> y;
    adj[x - 1].push_back(y - 1);
    adj[y - 1].push_back(x - 1);
  }
  cout << Solution(n, adj).solve() << endl;
}
