#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
vector<int> E[maxn];
int num[2], cnt[maxn], n;
long long ans = 0;
void dfs(int u, int fa, int col) {
  if (E[u].size() == 1 && E[u][0] == fa) {
    cnt[u] = 1;
    num[col]++;
    return;
  }
  cnt[u] = 1;
  num[col]++;
  for (int v : E[u]) {
    if (v == fa) continue;
    dfs(v, u, 1 - col);
    ans += 1ll * cnt[v] * (n - cnt[v]);
    cnt[u] += cnt[v];
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i < n; i++) {
    int x, y;
    cin >> x >> y;
    E[x].push_back(y);
    E[y].push_back(x);
  }
  dfs(1, 0, 0);
  cout << (ans + 1ll * num[0] * num[1]) / 2 << "\n";
  return 0;
}
