#include <bits/stdc++.h>
using namespace std;
int n;
struct state {
  long long a[2][2], b[2][2][3];
  state() {
    memset(a, 0, sizeof(a));
    memset(b, 0, sizeof(b));
  }
  state(int) {
    memset(a, 0, sizeof(a));
    memset(b, 0, sizeof(b));
    b[0][0][0] = a[0][0] = 1;
  }
  void extend(int sz) {
    if (sz != -1) a[1][1] += a[0][1] * sz * (n - sz);
    for (int d : {0, 1}) {
      for (int i = 1; i >= 0; --i) b[d][1][i + 1] += b[d][0][i];
    }
    if (sz != -1) b[1][1][1] += b[0][1][1];
  }
  void extend_root() {
    for (int d : {0, 1}) {
      for (int i : {1, 0}) b[d][1][i + 1] += b[d][0][i];
    }
  }
  void merge(const state x) {
    static long long aa[2][2], bb[2][2][3];
    memset(bb, 0, sizeof(bb));
    memset(aa, 0, sizeof(aa));
    for (int d0 : {0, 1}) {
      for (int d1 = 0; d0 + d1 <= 1; ++d1) {
        for (int u0 : {0, 1}) {
          for (int u1 : {0, 1}) {
            if (u0 && !u1) continue;
            int u2 = u0 || !u1;
            aa[d0 + d1][u2] += a[d0][u0] * x.a[d1][u1];
            for (int l0 : {0, 1, 2}) {
              for (int l1 = 0; l0 + l1 <= 2; ++l1) {
                bb[d0 + d1][u2][l0 + l1] += b[d0][u0][l0] * x.b[d1][u1][l1];
              }
            }
          }
        }
      }
    }
    for (int d : {0, 1})
      for (int u : {0, 1}) {
        for (int l : {0, 1, 2}) b[d][u][l] = bb[d][u][l];
        a[d][u] = aa[d][u];
      }
  }
};
const int N = 5e5 + 5;
vector<int> G[N];
state dp[N];
int sz[N];
void dfs(int x, int p) {
  dp[x] = state(1);
  sz[x] = 1;
  for (int u : G[x])
    if (u != p) {
      dfs(u, x);
      sz[x] += sz[u];
      dp[u].extend(sz[u]);
      dp[x].merge(dp[u]);
    }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  dfs(1, 0);
  dp[1].extend(-1);
  long long ans = dp[1].b[1][1][2] + dp[1].a[1][1];
  printf("%lld\n", ans);
}
