#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
struct Tree {
  int to, next;
} e[N * 2];
int n, head[N], cnt, dep[N], size[N];
long long ans, num;
void add(int x, int y) {
  e[++cnt].to = y;
  e[cnt].next = head[x];
  head[x] = cnt;
}
void DFS(int x, int last) {
  size[x] = 1;
  for (int i = head[x]; i; i = e[i].next) {
    int v = e[i].to;
    if (v == last) continue;
    dep[v] = dep[x] + 1;
    DFS(v, x);
    size[x] += size[v];
  }
}
int main() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    add(x, y), add(y, x);
  }
  DFS(1, 0);
  for (int i = 1; i <= n; i++) {
    ans += size[i] * (long long)(n - size[i]);
    if (dep[i] % 2 == 1) num++;
  }
  ans += num * (long long)(n - num);
  cout << ans / 2;
  return 0;
}
