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

template<Int Mod = 1000000007> class modint{
public:
	Int val;
	constexpr modint(const Int x = 0) : val(x % Mod) {if(val < 0) val += Mod;}
	constexpr modint operator+(const modint rhs) const {
		return modint(*this) += rhs;
	}
	constexpr modint operator-(const modint rhs) const {
		return modint(*this) -= rhs;
	}
	constexpr modint operator*(const modint rhs) const {
		return modint(*this) *= rhs;
	}
	constexpr modint operator/(const modint rhs) const {
		return modint(*this) /= rhs;
	}
	constexpr modint operator-() const {
		return modint(Mod - val);
	}
	constexpr modint &operator+=(const modint rhs){
		val += rhs.val;
		if(val >= Mod) val -= Mod;
		return *this;
	}
	constexpr modint &operator-=(const modint rhs){
		if(val < rhs.val) val += Mod;
		val -= rhs.val;
		return *this;
	}
	constexpr modint &operator*=(const modint rhs){
		val *= rhs.val;
		val %= Mod;
		return *this;
	}
	constexpr modint &operator/=(const modint rhs){
		return *this *= inv(rhs);
	}
	constexpr modint &operator++(){
		++val;
		if(val == Mod) val = 0;
		return *this;
	}
	constexpr modint &operator--(){
		--val;
		if(val == -1) val = Mod - 1;
		return *this;
	}
	constexpr modint operator<<(const Int rhs) const {
		return modint(*this) << rhs;
	}
	constexpr modint operator>>(const Int rhs) const {
		return modint(*this) >> rhs;
	}
	constexpr modint &operator<<=(const Int rhs){
		val <<= rhs;
		val %= Mod;
		return *this;
	}
	constexpr modint &operator>>=(const Int rhs){
		val >>= rhs;
		val %= Mod;
		return *this;
	}
	constexpr bool operator==(const modint rhs) const {
		return val == rhs.val;
	}
	constexpr bool operator!=(const modint rhs) const {
		return val != rhs.val;
	}
	constexpr bool operator<(const modint rhs) const {
		return val < rhs.val;
	}
	constexpr bool operator>(const modint rhs) const {
		return val > rhs.val;
	}
	constexpr bool operator<=(const modint rhs) const {
		return val <= rhs.val;
	}
	constexpr bool operator>=(const modint rhs) const {
		return val >= rhs.val;
	}
	friend ostream& operator<<(ostream& os, const modint<Mod>& m){
		return os << m.val;
	}
	friend istream& operator>>(istream& is, modint<Mod>& m){
		return is >> m.val;
	}
	static constexpr modint inv(modint m){
		Int a = m.val, b = Mod, u = 1, v = 0;
		while(b){
			Int t = a / b;
			a -= t * b;
			swap(a, b);
			u -= t * v;
			swap(u, v);
		}
		u %= Mod;
		if(u < 0) u += Mod;
		return modint(u);
	}
	constexpr operator Int() const {
		return val;
	}
};
template<class T> T pwr(T a, T e, Int n){
	while(n > 0){
		if(n & 1) e *= a;
		a *= a;
		n >>= 1;
	}
	return e;
}

class edge{
public:
	Int cost;
	size_t from, to;
	edge(Int c, size_t f, size_t t){
		cost = c;
		from = f;
		to = t;
	}
};
using edges = vector<edge>;
using graph = vector<edges>;
void readgraph(graph &g, size_t E, bool D, bool C, bool Z){ // E:num_of_edges, D:directed, C:costed, Z:already 0-indexed
	for(size_t i=0; i<E; ++i){
		edge e(1, 0, 0);
		if(!C) cin >> e.from >> e.to;
		else cin >> e.from >> e.to >> e.cost;
		if(!Z){
			--e.from;
			--e.to;
		}
		g[e.from].push_back(e);
		if(!D){
			swap(e.from, e.to);
			g[e.from].push_back(e);
		}
	}
}

void dfs(graph &g, vector<Int> &pa, vector<Int> &sz, size_t v){
	sz[v] = 1;
	if((Int)g[v].size() == 1 && (Int)g[v][0].to == pa[v])
		return;
	for(auto e:g[v]){
		Int t = e.to;
		if(t == pa[v]) continue;
		pa[t] = v;
		dfs(g, pa, sz, t);
		sz[v] += sz[t];
	}
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	Int n; cin >> n;
	graph g(n);
	readgraph(g, n-1, false, false, false);
	vector<Int> pa(n);
	vector<Int> sz(n, 0);
	pa[0] = -1;
	dfs(g, pa, sz, 0);
	using mint = modint<>;
	mint ans = mint(n) * pwr(mint(2), mint(1), n-1) + mint(n-2);
//	cerr << ans << "\n";
	for(auto es:g)
		for(auto e:es){
			Int f = e.from;
			Int t = e.to;
			if(t < f) continue;
			Int c;
			if(pa[f] == t) c = f;
			else c = t;
			ans -= pwr(mint(2), mint(1), sz[c]);
			ans -= pwr(mint(2), mint(1), n-sz[c]);
//			cerr << sz[c] << " " << n-sz[c] << "\n";
//			cerr << ans << "\n";
		}
//	cerr << ans << "\n";
	for(Int i=0; i<n; ++i)
		ans /= mint(2);
	cout << ans << "\n";
//	for(Int i=0; i<n; ++i)
//		cerr << i << " " << sz[i] << "\n";
}

Measured memory_bytes: 35584