#include <bits/stdc++.h>
using namespace std;
const int maxn = 200050;
int n, a, b, no, cnt, du[maxn];
int num[maxn], head[maxn];
struct node {
  int to, nxt;
} e[maxn << 1];
void add(int a, int b) {
  e[no].to = b, e[no].nxt = head[a];
  head[a] = no++;
  e[no].to = a, e[no].nxt = head[b];
  head[b] = no++;
}
int dfs(int u, int fa, int dep) {
  num[u] = 1;
  if (dep & 1) cnt++;
  for (int i = head[u]; i != -1; i = e[i].nxt) {
    int v = e[i].to;
    if (v == fa) continue;
    num[u] += dfs(v, u, dep + 1);
  }
  return num[u];
}
int main() {
  scanf("%d", &n);
  cnt = no = 0;
  memset(head, -1, sizeof(head));
  memset(du, 0, sizeof(du));
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &a, &b);
    du[a]++, du[b]++;
    add(a, b);
  }
  memset(num, 0, sizeof(num));
  dfs(1, 0, 1);
  long long ans = 0;
  for (int i = 1; i <= n; i++) ans += 1LL * num[i] * (n - num[i]);
  long long tmp = 1LL * cnt * (n - cnt);
  ans = (ans - tmp) / 2 + tmp;
  printf("%I64d\n", ans);
  return 0;
}
