#include <bits/stdc++.h>
using namespace std;
int n, m;
long long ans = 0, cnt = 0;
long long size[200009];
vector<int> a[200009];
int vis[200009] = {0};
void dfs(int u, int d) {
  vis[u] = 1;
  size[u] = 1;
  if (d & 1) cnt++;
  for (int i = 0; i < a[u].size(); i++) {
    int v = a[u][i];
    if (vis[a[u][i]] == 0) {
      dfs(v, d + 1);
      size[u] += size[v];
    }
  }
  ans += size[u] * (n - size[u]);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    a[u].push_back(v);
    a[v].push_back(u);
  }
  dfs(1, 0);
  ans += cnt * (n - cnt);
  printf("%I64d\n", ans / 2);
  return 0;
}
