#include <bits/stdc++.h>
using namespace std;
int n;
;
vector<vector<int> > v;
int DFS(int s, int p) {
  if (v[s].size() == 1 && s != 1) return 1;
  int cnt = 0;
  for (int i = 0; i < v[s].size(); i++) {
    if (v[s][i] == p) continue;
    cnt += DFS(v[s][i], s);
  }
  return cnt + (s == 1 && v[s].size() == 1 ? 1 : 0);
}
long long pw(long long a, long long b) {
  if (b == 0) return 1;
  long long half = pw(a, b / 2) % 1000000007;
  long long h = (half * half) % 1000000007;
  if (b % 2)
    return (h * a) % 1000000007;
  else
    return (h) % 1000000007;
}
int main() {
  scanf("%d", &n);
  if (n == 2) return cout << 4, 0;
  v.resize(n + 1);
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  int out = DFS(1, 0), in = n - out;
  long long m = 1ll * (out * pw(2, in + 1)) % 1000000007;
  long long ans = (1ll * (in * pw(2, in)) % 1000000007 + m);
  printf("%lld\n", ans % 1000000007);
  return 0;
}
