#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 2e5 + 5;
const long long MOD = 1e9 + 7;
const double pi = 3.1415926535;
long long n, depsum[MAXN], siz[MAXN], ans, dp[MAXN][2];
vector<long long> G[MAXN];
void dfs(long long u, long long pre) {
  for (long long i = 0; i < G[u].size(); i++) {
    long long v = G[u][i];
    if (v == pre) {
      continue;
    }
    dfs(v, u);
    ans += depsum[u] * siz[v] + depsum[v] * siz[u];
    ans += dp[u][0] * dp[v][0] + dp[u][1] * dp[v][1];
    ans += depsum[v];
    ans += dp[v][0];
    depsum[u] += depsum[v];
    siz[u] += siz[v];
    dp[u][0] += dp[v][1];
    dp[u][1] += dp[v][0];
  }
  dp[u][0]++;
  siz[u]++;
  depsum[u] += siz[u];
}
void init() {
  ans = 0;
  memset(siz, 0, sizeof(siz));
  memset(depsum, 0, sizeof(depsum));
  memset(dp, 0, sizeof(dp));
  for (long long i = 1; i <= 10; i++) {
    G[i].clear();
  }
}
void solve() {
  dfs(1, 0);
  printf("%lld\n", ans / 2);
}
int main() {
  while (~scanf("%lld", &n)) {
    init();
    for (long long i = 1; i < n; i++) {
      long long u, v;
      scanf("%lld %lld", &u, &v);
      G[u].push_back(v);
      G[v].push_back(u);
    }
    solve();
  }
}
