#include <bits/stdc++.h>
using namespace std;
using llint = long long;
const int N = 1e5 + 10, B = 1e9 + 7;
int n;
vector<int> e[N];
llint down[N][2], cnt[N][2], a[N][2];
llint add(llint x, llint y) {
  x = (x + y) % B;
  if (x < 0) x += B;
  return x;
}
llint mul(llint x, llint y) {
  x %= B, y %= B;
  x = x * y % B;
  if (x < 0) x += B;
  return x;
}
void dfs(int v, int p) {
  down[v][0] = down[v][1] = 1;
  a[v][0] = a[v][1] = 1;
  bool leaf = 1;
  for (int u : e[v]) {
    if (u == p) continue;
    dfs(u, v);
    a[v][0] = mul(a[v][0], down[u][0]);
    a[v][1] = mul(a[v][1], down[u][1]);
    leaf = 0;
  }
  if (leaf) {
    a[v][0] = 1;
    a[v][1] = 1;
    down[v][0] = down[v][1] = 1;
  } else {
    down[v][1] = down[v][0] = add(a[v][0], a[v][1]);
  }
}
llint mypw(llint a, int b) {
  llint ret = 1;
  while (b) {
    if (b & 1) ret = ret * a % B;
    b >>= 1;
    a = a * a % B;
  }
  return ret;
}
llint inv(llint x) { return mypw(x, B - 2); }
void dfs(int v, int p, llint up0, llint up1) {
  cnt[v][1] = cnt[v][0] = add(mul(up0, a[v][0]), mul(up1, a[v][1]));
  for (auto u : e[v]) {
    if (u == p) continue;
    llint tmp0 = mul(a[v][0], inv(down[u][0]));
    llint tmp1 = mul(a[v][1], inv(down[u][1]));
    llint a = mul(tmp0, up0) + mul(tmp1, up1);
    if (v == 1 && e[v].size() == 1)
      dfs(u, v, 1, 1);
    else
      dfs(u, v, a, a);
  }
}
void run() {
  scanf("%d", &n);
  for (int i = 1; i < n; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    e[a].push_back(b);
    e[b].push_back(a);
  }
  dfs(1, 0);
  dfs(1, 0, 1, 1);
  llint ans = 0;
  for (int i = 1; i <= n; ++i) {
    ans = add(ans, cnt[i][0]);
  }
  printf("%lld\n", ans);
}
int main() {
  run();
  return 0;
}
