#include <bits/stdc++.h>
using namespace std;
const int maxn = 500005;
struct Edge {
  int from, to, nxt;
  Edge() {}
  Edge(int from, int to, int nxt) : from(from), to(to), nxt(nxt) {}
} edges[maxn << 1];
int n, E_cnt, lst[maxn], siz[maxn], fa[maxn];
struct AS {
  long long a[2][2];
  void clear() { memset(a, 0, sizeof(a)); }
  long long *operator[](int x) { return a[x]; }
} f[maxn], g[maxn], c[maxn], s[maxn];
inline int read() {
  int res = 0, f_f = 1;
  int ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f_f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    res = (res << 3) + (res << 1) + (ch - '0'), ch = getchar();
  return res * f_f;
}
inline void add_edge(int from, int to) {
  edges[++E_cnt] = Edge(from, to, lst[from]);
  lst[from] = E_cnt;
}
inline void mul(AS &a, AS &b, AS &cc) {
  for (int j = 0; j < 2; j++)
    for (int k = 0; k < 2; k++)
      a[j][k] = b[j][k] * cc[0][0] + b[0][0] * cc[j][k];
  a[0][0] -= b[0][0] * cc[0][0];
  a[1][1] += b[1][0] * (cc[1][0] + cc[0][1]) + cc[1][0] * (b[1][0] + b[0][1]);
}
inline void dfs1(int u, int cur) {
  AS b, bb;
  b.clear();
  b[0][0] = 1;
  siz[u] = 1, fa[u] = cur;
  for (int i = lst[u]; ~i; i = edges[i].nxt) {
    Edge &e = edges[i];
    if (e.to == cur) continue;
    dfs1(e.to, u);
    bb = b, mul(b, bb, f[e.to]);
    for (int j = 0; j < 2; j++) {
      for (int k = 0; k < 2; k++) {
      }
    }
    siz[u] += siz[e.to];
  }
  f[u][0][0] = b[1][0];
  f[u][0][1] = b[1][1];
  f[u][1][0] = b[0][0];
  f[u][1][1] = b[0][1] + b[1][0];
}
long long tot, w[maxn];
inline void dfs2(int u, int cur) {
  int tot = 0;
  if (!cur) g[u][1][0] = 1;
  for (int i = lst[u]; ~i; i = edges[i].nxt) {
    Edge &e = edges[i];
    if (e.to == cur) continue;
    w[++tot] = e.to;
    c[tot][0][0] = c[tot][1][0] = c[tot][0][1] = c[tot][1][1] = 0;
    s[tot][0][0] = s[tot][1][0] = s[tot][0][1] = s[tot][1][1] = 0;
  }
  c[0][0][0] = 1;
  for (int i = 1; i <= tot; i++) {
    int o = w[i];
    mul(c[i], c[i - 1], f[o]);
  }
  s[tot + 1].clear();
  s[tot + 1][0][0] = 1;
  for (int i = tot; i; i--) {
    int o = w[i];
    AS b, bb;
    bb = c[i - 1], mul(b, bb, s[i + 1]);
    g[o][0][0] = g[u][1][0] * b[0][0];
    g[o][0][1] = g[u][1][1] * b[0][0] + g[u][1][0] * (b[0][1] + b[1][0]);
    g[o][1][0] = g[u][0][0] * b[0][0] + g[u][1][0] * b[1][0];
    g[o][1][1] = g[u][0][1] * b[0][0] + g[u][0][0] * (b[1][0] + b[0][1]) +
                 g[u][1][1] * b[1][0] + g[u][1][0] * (b[1][1] + b[0][0]);
    mul(s[i], s[i + 1], f[o]);
  }
  for (int i = lst[u]; ~i; i = edges[i].nxt) {
    Edge &e = edges[i];
    if (e.to == cur) continue;
    dfs2(e.to, u);
  }
}
int main() {
  memset(lst, -1, sizeof(lst));
  n = read(), E_cnt = -1;
  for (int i = 2; i <= n; i++) {
    int from = read(), to = read();
    add_edge(from, to);
    add_edge(to, from);
  }
  dfs1(1, 0), dfs2(1, 0);
  long long ans = 0;
  for (int i = 2; i <= n; i++) {
    ans += (f[i][0][1] + f[i][1][0]) * g[i][1][1];
    ans += f[i][0][0] * g[i][1][0] * siz[i] * (n - siz[i]);
  }
  printf("%lld\n", ans);
  return 0;
}
