#include <bits/stdc++.h>
using namespace std;
int n, cnt, dep[200010], head[200010];
long long cnt1[200010], cnt2[200010], _cnt1[200010], _cnt2[200010];
long long sum1[200010], sum2[200010], _sum1[200010], _sum2[200010];
struct Edge {
  int to, next;
} e[400010];
inline void add(int u, int v) {
  e[++cnt] = (Edge){v, head[u]};
  head[u] = cnt;
}
void dfs1(int u, int f) {
  dep[u] = dep[f] + 1;
  _cnt1[u] = _cnt2[u] = _sum1[u] = _sum2[u] = 0;
  for (int i = head[u]; i; i = e[i].next) {
    if (e[i].to == f) continue;
    dfs1(e[i].to, u);
    _cnt1[u] += _cnt2[e[i].to];
    _sum1[u] += _sum2[e[i].to] + _cnt2[e[i].to];
    _cnt2[u] += _cnt1[e[i].to];
    _sum2[u] += _sum1[e[i].to] + _cnt1[e[i].to];
  }
  _cnt2[u]++;
}
void dfs2(int u, int f) {
  long long Cnt = 0, Sum = 0;
  for (int i = head[u]; i; i = e[i].next) {
    if (e[i].to == f) continue;
    Cnt = _cnt2[u] - _cnt1[e[i].to] + cnt2[u];
    Sum = _sum2[u] - (_sum1[e[i].to] + _cnt1[e[i].to]) + sum2[u] + Cnt;
    sum1[e[i].to] = Sum;
    cnt1[e[i].to] = Cnt;
    Cnt = _cnt1[u] - _cnt2[e[i].to] + cnt1[u];
    Sum = _sum1[u] - (_sum2[e[i].to] + _cnt2[e[i].to]) + sum1[u] + Cnt;
    sum2[e[i].to] = Sum;
    cnt2[e[i].to] = Cnt;
    dfs2(e[i].to, u);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= 100; i++)
    ;
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    add(u, v);
    add(v, u);
  }
  dfs1(1, 0);
  dfs2(1, 0);
  long long ans = 0;
  for (int i = 1; i <= 100; i++)
    ;
  for (int i = 1; i <= n; i++) {
    ans += (_sum2[i] + sum2[i]) / 2;
    ans += (_sum1[i] - _cnt1[i]) / 2 + (sum1[i] - cnt1[i]) / 2 +
           (_cnt1[i] + cnt1[i]);
  }
  for (int i = 1; i <= 100; i++)
    ;
  printf("%lld\n", ans / 2);
}
