#include <bits/stdc++.h>
using namespace std;
inline void read(long long &x) {
  char ch;
  bool flag = false;
  for (ch = getchar(); !isdigit(ch); ch = getchar())
    if (ch == '-') flag = true;
  for (x = 0; isdigit(ch); x = x * 10 + ch - '0', ch = getchar())
    ;
  x = flag ? -x : x;
}
const long long MAXN = 55;
bitset<MAXN> now, tmp;
bitset<MAXN> g[MAXN];
long long n, m;
long long f[1 << 22];
long long sum_f[1 << 22];
long long get_f1() {
  long long A = n / 2;
  long long B = n - A;
  for (long long i = 0; i < (1 << A); i++) {
    now.reset();
    f[i] = 1;
    for (long long j = 0; j < A; j++)
      if (i & (1ll << j)) {
        if ((now & g[j]).any()) {
          f[i] = 0;
          break;
        }
        now.set(j);
      }
  }
  for (long long i = 0; i < A; i++)
    for (long long j = 0; j < (1 << A); j++)
      if ((j & (1ll << i)) == 0) f[j | (1ll << i)] += f[j];
  for (long long j = 0; j < (1ll << A); j++) sum_f[j] = f[j];
  long long sum = 0;
  for (long long i = 0; i < (1ll << B); i++) {
    bool flag = 1;
    now.reset();
    tmp.reset();
    for (long long j = 0; j < B; j++) tmp.set(j + A);
    for (long long j = 0; j < B; j++)
      if (i & (1ll << j)) now.set(j + A);
    for (long long j = 0; j < B; j++)
      if (i & (1ll << j)) {
        if ((now & g[j + A]).any()) {
          flag = 0;
          break;
        }
        tmp |= g[j + A];
      }
    if (flag) {
      long long val = tmp.to_ullong();
      val = (1ll << n) - 1 - val;
      long long tk = 0;
      for (long long j = 0; j < B; j++)
        if (i & (1ll << (A + j))) {
          tk = j;
          break;
        }
      sum += sum_f[val];
    }
  }
  return sum;
}
long long tag[MAXN];
bool tag_flag = 1;
void dfs(long long x, long long op) {
  tag[x] = op;
  for (long long i = 0; i < n; i++)
    if (g[x][i])
      if (tag[i] == 0)
        dfs(i, -op);
      else if (tag[i] != -op)
        tag_flag = 0;
}
int main() {
  read(n);
  read(m);
  for (long long i = 0; i < n; i++) g[i].reset();
  for (long long i = 1; i <= m; i++) {
    long long x, y;
    read(x);
    read(y);
    x--;
    y--;
    g[x].set(y);
    g[y].set(x);
  }
  long long f1 = get_f1();
  long long cnt = 0;
  long long tot_0 = n;
  for (long long i = 0; i < n; i++)
    if (g[i].any()) tot_0--;
  for (long long i = 0; i < n; i++)
    if (tag[i] == 0) {
      dfs(i, 1);
      cnt++;
    }
  long long ans = (1ll << n) - f1 * 2ll - (1ll << cnt);
  ans += (1ll << tot_0) + ((tag_flag) ? (1ll << cnt) : 0) + (1ll << tot_0);
  if (m == 0) ans -= (1ll << n);
  cout << ans << endl;
  return 0;
}
