#include<bits/stdc++.h>
using namespace std;

#define Mod(x) (x>=P)&&(x-=P)
#define rep(i,a,b) for(ll i=a,i##end=b;i<=i##end;++i)
#define drep(i,a,b) for(ll i=a,i##end=b;i>=i##end;--i)
#define erep(i,a) for(ll i=hd[a];i;i=nxt[i])

typedef long long ll;
void Max(ll &x,ll y){x<y&&(x=y);}
void Min(ll &x,ll y){x>y&&(x=y);}

bool vio;
char IO;
ll rd(ll res=0){
	bool f=0;
	while(IO=getchar(),IO<48||IO>57)
		f|=IO=='-';
	do res=(res<<1)+(res<<3)+(IO^48);
	while(IO=getchar(),isdigit(IO));
	return f?-res:res;
}
const ll M=1005;
ll nxt[M],to[M],hd[M],ecnt,n,m;
bool mk[M],fl;
ll dep[M];
void Add(ll a,ll b){
	nxt[++ecnt]=hd[a],to[hd[a]=ecnt]=b;
}
void dfs(ll x){
	if(!fl)return ;
	erep(i,x){
		ll y=to[i];
		if(!mk[y])continue;
		if(dep[y]==-1)dep[y]=dep[x]^1,dfs(y);
		else if(dep[y]==dep[x])fl=0;
	}
}	
bool let;
int main(){
	cerr<<(&vio-&let)/1024.0/1024<<endl;	
	n=rd(),m=rd();
	rep(i,1,m){
		ll a=rd(),b=rd();
		Add(a,b),Add(b,a);
	}
	ll S=(1<<n)-1,res=0;
	rep(k,0,S){
		rep(i,1,n)mk[i]=0,dep[i]=-1;
		rep(i,1,n)if(1<<(i-1)&k)
			mk[i]=1;
		ll ans=1;
		fl=1;
		rep(i,1,n)if(!mk[i])
			erep(j,i)if(!mk[to[j]])fl=0;
		rep(i,1,n)if(mk[i]&&dep[i]==-1)
			ans=ans*2,dep[i]=0,dfs(i);
		if(fl)res+=ans;
	}
	printf("%lld",res);
	return 0;
}	

//include <atcoder>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <tuple>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#define flush fflush(stdout)
#define endl '\n'
#define all(v) v.begin(), v.end()
using namespace std;
//using namespace atcoder;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pl;
const int mod1 = (int)1e9 + 7, mod2 = (int)998244353;
const int INF = (int)1e9;
const ll LINF = (ll)1e18 + 10;
const int di[8] = {1, 0, -1, 0, 1, 1, -1, -1}, dj[8] = {0, 1, 0, -1, -1, 1, -1, 1};

#define rep0(i, n) for (i = 0; i < n; i++)
#define rep1(i, a, b) for (i = a; i < b; i++)

template <typename T>
T my_abs(T x){
    return (x >= 0)? x : -x;
}

template <typename T>
void chmax(T &a, T b){
    a = max(a, b);
}

template <typename T>
void chmin(T &a, T b){
    a = min(a, b);
}

ll gcd(ll a, ll b){
    if (a > b) return gcd(b, a);
    if (a == 0) return b;
    return gcd(b % a, a);
}

bool incld_bit(int bit, int i){
    return ((bit>>i) & 1) == 1;
}

// --------------------------------------------------------------------------------

int main(void){
    int i, j;
    int a, b, c;

    cin >> a >> b >> c;

    int ans;
    if (a == b){
        ans = c;
    }else if (b == c){
        ans = a;
    }else if (c == a){
        ans = b;
    }else{
        ans = 0;
    }

    cout << ans << endl;

    return 0;
}