#include <bits/stdc++.h>
using namespace std;
struct Node {
  int to, next;
} e[400005];
int siz[200005], d[200005], h[200005], cnt;
inline void Addedge(int x, int y) {
  e[++cnt] = (Node){y, h[x]};
  h[x] = cnt;
  return;
}
inline void dfs(int x, int pre) {
  int i, y;
  d[x] = d[pre] + 1;
  siz[x] = 1;
  for (i = h[x]; i; i = e[i].next) {
    y = e[i].to;
    if (y == pre) continue;
    dfs(y, x);
    siz[x] += siz[y];
  }
  return;
}
int main(void) {
  int i, n, x, y, sum = 0;
  long long ans = 0;
  scanf("%d", &n);
  for (i = 1; i < n; ++i) {
    scanf("%d%d", &x, &y);
    Addedge(x, y);
    Addedge(y, x);
  }
  dfs(1, 0);
  for (i = 1; i <= n; ++i) {
    ans += 1LL * siz[i] * (n - siz[i]);
    if (d[i] & 1) ++sum;
  }
  ans += 1LL * sum * (n - sum);
  printf("%lld\n", ans / 2);
  return 0;
}
