#include<bits/stdc++.h>
//ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<pii,int> ppii;
typedef pair<int,pii> pipi;
typedef pair<ll,ll> pll;
typedef pair<pll,ll> ppll;
typedef pair<ll,pll> plpl;
typedef tuple<ll,ll,ll> tl;
ll mod=1000000007;
ll mod2=998244353;
ll mod3=1000003;
ll mod4=998244853;
ll inf=1000000000000000000;
double pi=2*acos(0);
#define rep(i,m,n) for(ll i=m;i<n;i++)
#define rrep(i,n,m) for(ll i=n;i>=m;i--)
int dh[4]={1,-1,0,0};
int dw[4]={0,0,1,-1};
int ddh[8]={-1,-1,-1,0,0,1,1,1};
int ddw[8]={-1,0,1,-1,1,-1,0,1};
ll lmax(ll a,ll b){
    if(a<b)return b;
    else return a;
}
ll lmin(ll a,ll b){
    if(a<b)return a;
    else return b;
}
ll gcd(ll a,ll b){
    if(a<b)swap(a,b);
    if(b==0)return a;
    if(a%b==0)return b;
    return gcd(b,a%b);
}
ll Pow(ll n,ll k){
    ll ret=1;
    ll now=n;
    while(k>0){
        if(k&1)ret*=now;
        now*=now;
        k/=2;
    }
    return ret;
}
ll beki(ll n,ll k,ll md){
  ll ret=1;
  ll now=n;
  while(k>0){
    if(k%2==1){
      ret*=now;
      ret%=md;
    }
    now*=now;
    now%=md;
    k/=2;
  }
  return ret;
}
ll gyaku(ll n,ll md){
  return beki(n,md-2,md);
}

int main(){
    ios::sync_with_stdio(false);cin.tie(0);
    ll n;cin>>n;
    vector<ll> v[n+1];
    rep(i,0,n-1){
        ll a,b;cin>>a>>b;
        v[a].push_back(b);
        v[b].push_back(a);
    }
    if(n==2){
        cout<<0<<endl;
        return 0;
    }
    queue<ll> q;
    ll num=-1;
    rep(i,1,n+1){
        if(v[i].size()!=1){
            num=i;
            break;
        }
    }
    ll par[n+1];
    par[num]=0;
    q.push(num);
    v[num].push_back(0);
    while(q.size()>0){
        ll now=q.front();q.pop();
        rep(i,0,v[now].size()){
            ll ne=v[now][i];
            if(ne==par[now])continue;
            par[ne]=now;
            q.push(ne);
        }
    }
    //cout<<num<<endl;
    vector<ll> dp[n+1];
    
    rep(i,1,n+1){
        if(v[i].size()==1){
            q.push(i);
            dp[i].push_back(0);
        }
    }
    ll ans[n+1];
    fill(ans,ans+n+1,0);
    ll g2=gyaku(2,mod);
    ll cnt[n+1];
    ll anss=0;
    fill(cnt,cnt+n+1,0);
    while(q.size()>0){
        ll now=q.front();q.pop();
        ll sum=0;
        if(v[now].size()==1)ans[now]=0;
        else{
            
            rep(i,0,dp[now].size()){
                sum+=dp[now][i];
                
            }
            ll y=n-1-sum;
            dp[now].push_back(y);
            ans[now]+=beki(g2,n-1,mod);
            rep(i,0,dp[now].size()){
                ll u=beki(g2,n-1-dp[now][i],mod);
                ll tt=beki(g2,dp[now][i],mod);
                tt=1-tt+mod;
                tt%=mod;
                u*=tt;
                u%=mod;
                ans[now]+=u;
                ans[now]%=mod;
            }
            ans[now]=1-ans[now]+mod;
            ans[now]%=mod;
            ans[now]*=g2;
            ans[now]%=mod;
        }
        anss+=ans[now];
        anss%=mod;
        if(now==num)break;
        ll pa=par[now];
        sum++;
        dp[pa].push_back(sum);
        cnt[pa]++;
        if(cnt[pa]==v[pa].size()-1)q.push(pa);
    }
    cout<<anss<<endl;
}


Measured memory_bytes: 29824