#include <bits/stdc++.h>
using namespace std;
int n, vet[400005], Next[400005], head[200005], en, f[200005], root,
    Size[200005], all;
long long s0, s1, s;
long long ans;
bool vis[200005];
void addedge(int u, int v) {
  en++;
  vet[en] = v;
  Next[en] = head[u];
  head[u] = en;
}
void getsize(int u, int pre) {
  Size[u] = 1;
  for (int i = head[u]; i; i = Next[i])
    if (!vis[vet[i]] && vet[i] != pre) {
      int v = vet[i];
      getsize(v, u);
      Size[u] += Size[v];
    }
}
void getroot(int u, int pre) {
  f[u] = all - Size[u];
  for (int i = head[u]; i; i = Next[i])
    if (!vis[vet[i]] && vet[i] != pre) {
      int v = vet[i];
      getroot(v, u);
      f[u] = max(f[u], Size[v]);
    }
  if (f[u] < f[root]) root = u;
}
void calcroot(int u) {
  root = 0;
  getsize(u, 0);
  all = Size[u];
  getroot(u, 0);
}
void dfs1(int u, int pre, int deep) {
  if (deep % 2 == 0)
    ans += s0 + (deep >> 1) * s;
  else
    ans += s1 + ((deep + 1) >> 1) * s;
  ans += (deep + 1) >> 1;
  for (int i = head[u]; i; i = Next[i])
    if (!vis[vet[i]] && vet[i] != pre) {
      int v = vet[i];
      dfs1(v, u, deep + 1);
    }
}
void dfs2(int u, int pre, int deep) {
  s++;
  s0 += ((deep + 1) >> 1);
  s1 += (deep >> 1);
  for (int i = head[u]; i; i = Next[i])
    if (!vis[vet[i]] && vet[i] != pre) {
      int v = vet[i];
      dfs2(v, u, deep + 1);
    }
}
void dfs(int u) {
  vis[u] = true;
  s = 0;
  s0 = 0;
  s1 = 0;
  for (int i = head[u]; i; i = Next[i])
    if (!vis[vet[i]]) {
      int v = vet[i];
      dfs1(v, 0, 1);
      dfs2(v, 0, 1);
    }
  for (int i = head[u]; i; i = Next[i])
    if (!vis[vet[i]]) {
      int v = vet[i];
      calcroot(v);
      dfs(root);
    }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    addedge(x, y);
    addedge(y, x);
  }
  f[0] = 1000000000;
  calcroot(1);
  dfs(root);
  printf("%lld\n", ans);
  return 0;
}
