#include <bits/stdc++.h>
using namespace std;
vector<int> ma[200005];
int p[200005];
long long yu;
void dfs(int pos, int fa, int now) {
  p[pos] = 1;
  yu += 1LL * now;
  int sz = ma[pos].size();
  for (int i = 0; i < sz; i++) {
    int to = ma[pos][i];
    if (to == fa) continue;
    dfs(to, pos, 1 - now);
    p[pos] += p[to];
  }
}
int main() {
  int n;
  scanf("%d", &n);
  yu = 0;
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    ma[a].push_back(b);
    ma[b].push_back(a);
  }
  dfs(1, -1, 0);
  long long res = 0;
  for (int i = 1; i <= n; i++) {
    res += 1LL * p[i] * (n - p[i]);
  }
  res += yu * (n - yu);
  printf("%lld\n", res / 2);
}
