#include <bits/stdc++.h>
using namespace std;
const int Nmax = 2e5 + 11;
int n, white;
long long ans;
vector<int> a[Nmax];
int visit(int u, int col, int p) {
  if (col) ++white;
  int cnt = 1;
  for (int i = (int)0; i < (int)a[u].size(); ++i) {
    int v = a[u][i];
    if (v != p) cnt += visit(v, 1 - col, u);
  }
  ans += 1LL * (n - cnt) * cnt;
  return cnt;
}
int main() {
  scanf("%d", &n);
  for (int i = (int)1; i <= (int)n - 1; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    a[u].push_back(v);
    a[v].push_back(u);
  }
  visit(1, 0, -1);
  ans = (ans + 1LL * white * (n - white)) / 2;
  cout << ans;
}
