#include <bits/stdc++.h>
using namespace std;
long long p, n, i, j, a, b, MOD = 1000000007, prod = 1, res, val;
vector<long long> G[100001];
int main() {
  scanf("%lld", &n);
  for (i = 1; i <= n - 1; i++) {
    scanf("%lld%lld", &a, &b);
    G[a].push_back(b);
    G[b].push_back(a);
  }
  for (i = 1; i <= n; i++)
    if (G[i].size() == 1) p++;
  for (i = 1; i <= n - p; i++) prod = (prod * 2) % MOD;
  val = ((n - p) * prod) % MOD;
  res = (res + val) % MOD;
  prod = (prod * 2) % MOD;
  val = (p * prod) % MOD;
  res = (res + val) % MOD;
  printf("%d\n", res);
  return 0;
}
