#include <bits/stdc++.h>
using namespace std;
const long long N = 222222;
vector<long long> tree[N];
long long dep[N], cnt[N], cntt[N][2], n, ans, s0, s1;
void dfs(long long u, long long p = 0) {
  if (p) {
    dep[u] = dep[p] + 1;
  }
  cnt[u] = 1;
  if (dep[u] & 1) {
    s1++;
    cntt[u][1]++;
  } else {
    s0++;
    cntt[u][0]++;
  }
  for (auto v : tree[u]) {
    if (v == p) continue;
    dfs(v, u);
    cnt[u] += cnt[v];
    for (long long i = (0); i <= (1); i++) {
      ans += cntt[u][i] * cntt[v][i ^ 1];
      cntt[u][i] += cntt[v][i];
    }
  }
}
void dfs2(long long u, long long p = 0) {
  for (auto v : tree[u]) {
    if (v == p) continue;
    dfs2(v, u);
  }
  ans += cnt[u] * (n - cnt[u]);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (long long i = (1); i <= (n - 1); i++) {
    long long u, v;
    cin >> u >> v;
    tree[u].push_back(v);
    tree[v].push_back(u);
  }
  dfs(1);
  dfs2(1);
  ans >>= 1;
  cout << ans << "\n";
  return 0;
}
