#include <bits/stdc++.h>
using namespace std;
void qmax(int &x, int y) {
  if (x < y) x = y;
}
void qmin(int &x, int y) {
  if (x > y) x = y;
}
inline int read() {
  char s;
  int k = 0, base = 1;
  while ((s = getchar()) != '-' && s != EOF && !(isdigit(s)))
    ;
  if (s == EOF) exit(0);
  if (s == '-') base = -1, s = getchar();
  while (isdigit(s)) k = k * 10 + (s ^ '0'), s = getchar();
  return k * base;
}
inline void write(long long x) {
  static char cnt, num[20];
  cnt = 0;
  if (!x) {
    putchar('0');
    return;
  }
  for (; x; x /= 10) num[++cnt] = x % 10;
  for (; cnt; putchar(num[cnt--] + 48))
    ;
}
const int maxn = 2e5 + 100;
int n;
int po[maxn], to[maxn << 1], ne[maxn << 1], id;
int dep[maxn], cnt[2], sz[maxn];
long long sum, ans;
void add(int x, int y) {
  id++;
  to[id] = y, ne[id] = po[x], po[x] = id;
}
void dfs1(int x, int fa) {
  cnt[dep[x] & 1]++;
  sum += dep[x];
  sz[x] = 1;
  for (int i = po[x]; i; i = ne[i])
    if (to[i] != fa) {
      dep[to[i]] = dep[x] + 1;
      dfs1(to[i], x);
      sz[x] += sz[to[i]];
    }
}
void dfs(int x, int fa) {
  ans += sum / 2 + (cnt[1] + 1) / 2;
  for (int i = po[x]; i; i = ne[i])
    if (to[i] != fa) {
      sum = sum - sz[to[i]] + (n - sz[to[i]]);
      swap(cnt[0], cnt[1]);
      dfs(to[i], x);
      swap(cnt[0], cnt[1]);
      sum = sum + sz[to[i]] - (n - sz[to[i]]);
    }
}
int main() {
  n = read();
  for (int i = 1, x, y; i < n; i++) {
    x = read(), y = read();
    add(x, y);
    add(y, x);
  }
  dfs1(1, 0);
  dfs(1, 0);
  ans /= 2;
  printf("%lld\n", ans);
  return 0;
}
