#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int N = 1e5 + 5;
vector<int> tree[N];
long long pows[N], dp[N];
void dfs(int i, int p) {
  dp[i] = 0;
  for (int j : tree[i]) {
    if (j != p) {
      dfs(j, i);
      dp[i] += dp[j];
    }
  }
  if (dp[i] == 0) dp[i]++;
}
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    tree[a].push_back(b);
    tree[b].push_back(a);
  }
  pows[0] = 1;
  for (int i = 1; i < n; ++i) {
    pows[i] = pows[i - 1] * 2 * 1LL;
    pows[i] %= MOD;
  }
  dfs(0, -1);
  long long leaf = dp[0];
  if (tree[0].size() == 1) leaf++;
  long long res = leaf * pows[n - leaf + 1];
  res %= MOD;
  res += (n - leaf) * pows[n - leaf];
  res %= MOD;
  cout << res << endl;
  return 0;
}
