#include <bits/stdc++.h>
using namespace std;
const int M = (int)1e9 + 7;
int add(int a, int b) {
  a += b;
  if (a >= M) {
    return a - M;
  }
  if (a < 0) {
    return a + M;
  }
  return a;
}
int mul(int a, int b) { return a * (long long)b % M; }
int pw(int a, int b) {
  int r = 1;
  while (b) {
    if (b & 1) {
      r = mul(r, a);
    }
    a = mul(a, a);
    b /= 2;
  }
  return r;
}
int dv(int a, int b) { return mul(a, pw(b, M - 2)); }
const int N = (int)1e5 + 7;
int n;
int sol;
int inv2;
int dp[N];
bool leaf[N];
vector<int> g[N];
void dfs(int a, int p) {
  for (auto &b : g[a]) {
    if (b != p) {
      dfs(b, a);
    }
  }
  leaf[a] = 1;
  dp[a] = 1;
  for (auto &b : g[a]) {
    if (b != p) {
      leaf[a] = 0;
      dp[a] = mul(dp[a], dp[b]);
    }
  }
  if (!leaf[a]) {
    dp[a] = mul(dp[a], 2);
  }
}
void reroot(int a, int p) {
  int leaf1 = leaf[a];
  leaf[a] = ((int)g[a].size() - (p != -1)) == 0;
  int leaf2 = leaf[a];
  int x = dv(dp[a], dp[p]);
  if (leaf1 != leaf2) {
    if (leaf2) {
      x = mul(x, inv2);
    } else {
      x = mul(x, 2);
    }
  }
  dp[a] = x;
  if (leaf[p]) {
    dp[p] = mul(dp[p], 2);
  }
  leaf[p] = 0;
  dp[p] = mul(dp[p], dp[a]);
}
void solve(int a, int p) {
  sol = add(sol, dp[a]);
  for (auto &b : g[a]) {
    if (b != p) {
      reroot(a, b);
      solve(b, a);
      reroot(b, a);
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  inv2 = dv(1, 2);
  cin >> n;
  for (int i = 1; i < n; i++) {
    int x, y;
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  dfs(1, -1);
  solve(1, -1);
  cout << sol << "\n";
}
