#include <bits/stdc++.h>
using namespace std;
int read() {
  int f = 1, x = 0;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = x * 10 + s - '0';
    s = getchar();
  }
  return x * f;
}
vector<int> G[200000 + 5];
int n, oe[200000 + 5], tsiz[200000 + 5];
void DFS(int u, int fa) {
  tsiz[u] = 1;
  int siz = G[u].size();
  for (int i = 0; i < siz; i++) {
    int v = G[u][i];
    if (v == fa) continue;
    oe[v] = !oe[u];
    DFS(v, u);
    tsiz[u] += tsiz[v];
  }
  return;
}
int main() {
  n = read();
  for (int i = 1; i < n; i++) {
    int u = read(), v = read();
    G[u].push_back(v), G[v].push_back(u);
  }
  DFS(1, 0);
  long long ans = 0, cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (oe[i]) cnt++;
    ans += 1ll * tsiz[i] * (n - tsiz[i]);
  }
  ans += cnt * (n - cnt);
  printf("%lld\n", ans / 2);
  return 0;
}
