#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<queue>
#include<cmath>
#include<cstdio>
#include<tuple>
#include<bitset>
#include<map>

using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<=n;++i)
#define ALL(x) x.begin(),x.end()
using ll = long long;
using lint = long long;
typedef pair<int,int> P;
const lint inf=1e18+7;
const int MOD=1000000007;
long long modinv(long long a, long long m) {
        long long b = m, u = 1, v = 0;
        while (b) {
            long long t = a / b;
            a -= t * b; swap(a, b);
            u -= t * v; swap(u, v);
        }
        u %= m;
        if (u < 0) u += m;
        return u;
    }
struct Node{
    int no;
    int par;
    vector<Node*> child;
    int sm;int nm;int wm;int wsm;
    class Close{
        public:
        int bnm;int wnm;
        int bsm;int wsm;
    };
    Close cl;
    class Open{
        public:
        int wnm;int wsm;
    };
    Open op;
    void build(int i){
        no=i;par=i;
        cl.bnm=0;cl.bsm=0;
        cl.wnm=0;cl.wsm=0;
        op.wnm=0;op.wsm=0;
    }
    void sumation(){
        nm=cl.bnm+cl.wnm+op.wnm;nm%=MOD;
        sm=cl.bsm+cl.wsm+op.wsm;sm%=MOD;
    }
};
struct Tree{
    int n;
    vector<Node> node;
    Tree(int k){
        n=k;
        node.resize(n+1);
        for(int i=1;i<=n;++i){
            node[i].build(i);
        }
    }
    void input(int k){
        for(int i=0;i<k;++i){
            int a,b;cin>>a>>b;
            node[a].child.push_back(&node[b]);
            node[b].child.push_back(&node[a]);
        }
    }
    void BFS(int s){
        queue<Node> que;
        que.push(node[s]);
        while(!que.empty()){
            Node buf=que.front();que.pop();
            int num=buf.child.size();
            for(int i=0;i<num;++i){
                if(buf.child[i]->no!=buf.par){
                    buf.child[i]->par=buf.no;
                    que.push(*buf.child[i]);
                }
            }
        }
    }
    void DFS(Node& node){
        if(node.child.size()==1&&node.par!=node.no){
            node.sm=0;node.nm=1;
            node.cl.bnm=1;
            return;
        }
        else{
            int num=node.child.size();
            int sm=0;int nm=1;
            for(int i=0;i<num;++i){
                if(node.child[i]->no!=node.par){
                    DFS(*node.child[i]);
                    nm*=node.child[i]->nm+1;
                    nm%=MOD;
                }
            }
            node.cl.bnm=nm;
            node.cl.wnm=nm+MOD-1;node.cl.wnm%=MOD;
            for(int i=0;i<num;++i){
                if(node.child[i]->no!=node.par){
                    node.cl.bsm+=node.child[i]->sm*((nm*modinv(node.child[i]->nm+1,MOD))%MOD);node.cl.bsm%=MOD;
                    node.op.wsm+=node.child[i]->sm;node.op.wsm%=MOD;
                    node.op.wnm+=node.child[i]->nm;node.op.wnm%=MOD;
                    node.cl.wnm+=MOD-node.child[i]->nm;node.cl.wnm%=MOD;
                }
            }
            for(int i=0;i<num;++i){
                //case of white
                if(node.child[i]->no!=node.par){
                    node.cl.wsm+=node.child[i]->sm*(((nm*modinv(node.child[i]->nm+1,MOD))%MOD)+MOD-1);node.cl.wsm%=MOD;
                }
            }
            node.cl.wsm+=node.cl.wnm;node.cl.wsm%=MOD;
            node.op.wsm+=node.op.wnm;node.op.wsm%=MOD;
            node.sumation();
        }
    }
    void solve(){
        BFS(1);
        DFS(node[1]);
        int sm=0;int nm=0;
        rep1(i,n){
            sm+=node[i].cl.bsm+node[i].cl.wsm;
            nm+=node[i].cl.bnm+node[i].cl.wnm;
        }
        sm%=MOD;
        nm+=1;
        nm%=MOD;
        int res=sm*modinv(nm,MOD);
        res%=MOD;
        //printf("nm=%lld sm=%lld\n",nm,sm);
        cout<<res<<"\n";
    }
};
signed main(){
  int n;cin>>n;
  Tree tree(n);
  tree.input(n-1);
  tree.solve();
  return 0;
}

Measured memory_bytes: 57884