#include <bits/stdc++.h>
using namespace std;
const long long N = 200005;
long long n;
struct qq {
  long long x, y, last;
} e[N * 2];
long long num, last[N];
void init(long long x, long long y) {
  num++;
  e[num].x = x;
  e[num].y = y;
  e[num].last = last[x];
  last[x] = num;
}
long long tot[N];
long long d[2];
long long sum;
void dfs(long long x, long long fa, long long o) {
  sum = sum + o;
  d[o & 1]++;
  tot[x] = 1;
  for (long long u = last[x]; u != -1; u = e[u].last) {
    long long y = e[u].y;
    if (y == fa) continue;
    dfs(y, x, o + 1);
    tot[x] = tot[x] + tot[y];
  }
}
long long ans = 0;
void dfs1(long long x, long long fa, long long now, long long o) {
  ans = ans + now / 2 + (d[o ^ 1] + 1) / 2;
  for (long long u = last[x]; u != -1; u = e[u].last) {
    long long y = e[u].y;
    if (y == fa) continue;
    dfs1(y, x, now + n - 2 * tot[y], o ^ 1);
  }
}
int main() {
  num = 0;
  memset(last, -1, sizeof(last));
  scanf("%lld", &n);
  for (long long u = 1; u < n; u++) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    init(x, y);
    init(y, x);
  }
  dfs(1, 0, 0);
  dfs1(1, 0, sum, 0);
  printf("%lld\n", ans / 2);
  return 0;
}
