#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005, mod = 1e9 + 7;
vector<int> sas[MAXN];
int sum[MAXN], w;
int pot(int wyk) {
  int res = 1, x = 2;
  for (; wyk; wyk /= 2) {
    if (wyk % 2) res = (long long)res * x % mod;
    x = (long long)x * x % mod;
  }
  return res;
}
void rob(int co, int nie, int gor) {
  int s = 0;
  if (gor == -1) {
    for (auto x : sas[co])
      if (x != nie) {
        rob(x, co, -1);
        s = (s + sum[x]) % (mod - 1);
      }
    if (co == nie || sas[co].size() > 1) s = (s + 1) % (mod - 1);
    sum[co] = s;
    if (co != nie) return;
  }
  s = sum[co];
  gor = max(gor, 0);
  if (co != nie) {
    s = (s + gor) % (mod - 1);
    if (sas[co].size() == 1) s = (s + 1) % (mod - 1);
  }
  w = (w + pot(s)) % mod;
  s = sum[co];
  if (co == nie && sas[co].size() == 1) s = (s - 1 + mod - 1) % (mod - 1);
  for (auto x : sas[co])
    if (x != nie)
      rob(x, co, ((long long)s + gor - sum[x] + (mod - 1)) % (mod - 1));
}
int main() {
  int a, b, c, d, e, f, g, q, n;
  scanf("%d", &n);
  if (n == 1) {
    printf("1");
    return 0;
  }
  for (a = 1; a < n; a++) {
    scanf("%d%d", &b, &c);
    sas[b].push_back(c);
    sas[c].push_back(b);
  }
  rob(1, 1, -1);
  printf("%d", w);
  return 0;
}
