#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
vector<int> g[N];
int sub[N][2];
long long sum[N][2];
void dfs(int u, int p, int l) {
  int m = l % 2, om = 1 - l % 2;
  sub[u][m] = 1;
  for (int v : g[u]) {
    if (v == p) continue;
    dfs(v, u, l + 1);
    sub[u][m] += sub[v][m];
    sub[u][om] += sub[v][om];
    sum[u][m] += sub[v][m] + sum[v][m];
    sum[u][om] += sub[v][om] + sum[v][om];
  }
}
long long ans = 0;
long long csum[2];
int csub[2];
void solve(int u, int p, int l) {
  int m = l % 2, om = 1 - l % 2;
  ans += sum[u][m] / 2;
  ans += (sum[u][om] + sub[u][om]) / 2;
  ans += csum[m] / 2;
  ans += (csum[om] + csub[om]) / 2;
  csub[m]++;
  for (int v : g[u]) {
    if (v == p) continue;
    for (int i = 0; i < 2; i++) {
      csum[i] += sum[v][i] + sub[v][i];
      csub[i] += sub[v][i];
    }
  }
  for (int v : g[u]) {
    if (v == p) continue;
    for (int i = 0; i < 2; i++) {
      csum[i] -= sum[v][i] + sub[v][i];
      csub[i] -= sub[v][i];
      csum[i] += csub[i];
    }
    solve(v, u, l + 1);
    for (int i = 0; i < 2; i++) {
      csum[i] -= csub[i];
      csub[i] += sub[v][i];
      csum[i] += sum[v][i] + sub[v][i];
    }
  }
  for (int v : g[u]) {
    if (v == p) continue;
    for (int i = 0; i < 2; i++) {
      csum[i] -= sum[v][i] + sub[v][i];
      csub[i] -= sub[v][i];
    }
  }
  csub[m]--;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(1, 0, 0);
  solve(1, 0, 0);
  printf("%lld\n", ans / 2);
  return 0;
}
