#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<long long>;
using pii = pair<int, int>;
using vpii = vector<pair<int, int>>;
template <class T>
inline bool ckmin(T &a, T b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
inline bool ckmax(T &a, T b) {
  return b > a ? a = b, 1 : 0;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const char nl = '\n';
const int mxN = 2e5 + 10;
const int MOD = 1e9 + 7;
const long long infLL = 1e18;
int fact[mxN];
int add(int x, int y) {
  x += y;
  while (x >= MOD) x -= MOD;
  while (x < 0) x += MOD;
  return x;
}
void ad(int &x, int y) { x = add(x, y); }
int sub(int x, int y) {
  x -= y;
  while (x >= MOD) x -= MOD;
  while (x < 0) x += MOD;
  return x;
}
void sb(int &x, int y) { x = sub(x, y); }
int mul(int x, int y) { return ((int64_t)x * (int64_t)y) % MOD; }
void ml(int &x, int y) { x = mul(x, y); }
int binpow(int x, int y) {
  int z = 1;
  while (y > 0) {
    if (y % 2 == 1) z = mul(z, x);
    x = mul(x, x);
    y /= 2;
  }
  return z;
}
int inv(int x) { return binpow(x, MOD - 2); }
int divide(int x, int y) { return mul(x, inv(y)); }
void precalc() {
  fact[0] = 1;
  for (int i = 1; i < mxN; i++) fact[i] = mul(i, fact[i - 1]);
}
int choose(int n, int k) {
  if (k > n) return 0;
  return divide(fact[n], mul(fact[n - k], fact[k]));
}
int n, a[mxN], l[mxN];
vi adj[mxN];
void dfs(int u, int p) {
  for (auto &v : adj[u]) {
    if (v != p) {
      dfs(v, u);
      l[u] += l[v];
    }
  }
  if ((int)adj[u].size() == 1) {
    l[u]++;
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = (0); i < (n - 1); i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  dfs(0, -1);
  cout << add(mul(l[0], binpow(2, n - l[0] + 1)),
              mul(n - l[0], binpow(2, n - l[0])))
       << nl;
  return 0;
}
