#include <bits/stdc++.h>
using namespace std;
const int Maxn = 200005;
int n, x, y, f[Maxn], sz[Maxn];
long long ans;
vector<int> g[Maxn];
void dfs(int u, int pr, int d) {
  sz[u] = 1;
  f[d]++;
  for (int i = 0; i < g[u].size(); ++i) {
    int v = g[u][i];
    if (v ^ pr) {
      dfs(v, u, d ^ 1);
      sz[u] += sz[v];
    }
  }
  ans += 1LL * sz[u] * (n - sz[u]);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; ++i) {
    scanf("%d%d", &x, &y);
    g[x].push_back(y);
    g[y].push_back(x);
  }
  dfs(1, 0, 0);
  ans = (ans + 1LL * f[0] * f[1]) / 2;
  printf("%lld\n", ans);
  return 0;
}
