#include<bits/stdc++.h>
using namespace std;
const int M=500001,P=1000000007;
vector<int >e[M];

int n,m,k,vis[M];
long long ksm(int l)
{
	long long ans=1,k=2;
	while(l)
	{
		if(l%2==1)ans*=k%P;
		l/=2;
		k*=2;
	}
	return ans;
	
}
int dfs(int i,int r,int fa)
{
    
	long long ans=1;
	for(auto k:e[i])
	{
	
		if(vis[k]>=2)continue;
	    vis[k]++;
		if(k!=fa)
		{
			ans*=(dfs(k,0,i)+dfs(k,1,i));
			
		}
		
	}
	if(r==0)
	return ans*2;
	else 
	{
	  return ans*1;
	}
}
int main()
{
	
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	
	cin>>n>>m;
	for(int i=1;i<=m;i++)
	{
		int u,v;
		cin>>u>>v;
		e[u].push_back(v);
		e[v].push_back(u);
	}
	long long ans=0;
	
	ans+=dfs(1,1,1);
	memset(vis,0,sizeof(int)*n);
	ans+=dfs(1,0,1);
	ans-=ksm(n);
	cout<<ans<<endl;
	return 0;
}
