#include <bits/stdc++.h>
using namespace std;
int n, edgecnt = 0, Head[200010], Next[401000], V[401000];
long long Size[201000], F[201000], G[201000], Ans = 0, sf = 0;
void Add_Edge(int u, int v) {
  Next[++edgecnt] = Head[u];
  V[edgecnt] = v;
  Head[u] = edgecnt;
  return;
}
void dfs1(int u, int fa) {
  G[u] = Size[u] = 1;
  for (int i = Head[u]; i != -1; i = Next[i])
    if (V[i] != fa) {
      dfs1(V[i], u);
      F[u] += G[V[i]];
      G[u] += F[V[i]];
      Size[u] += Size[V[i]];
    }
  return;
}
void dfs2(int u, int fa) {
  Ans = Ans + 1ll * Size[u] * (n - Size[u]);
  for (int i = Head[u]; i != -1; i = Next[i])
    if (V[i] != fa) {
      F[V[i]] += G[u] - F[V[i]];
      G[V[i]] += F[u] - G[V[i]];
      dfs2(V[i], u);
    }
  return;
}
int main() {
  memset(Head, -1, sizeof(Head));
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    Add_Edge(u, v);
    Add_Edge(v, u);
  }
  dfs1(1, 1);
  dfs2(1, 1);
  for (int i = 1; i <= n; i++) sf = sf + F[i];
  Ans = (Ans + sf / 2) / 2;
  printf("%lld\n", Ans);
  return 0;
}
