#include <bits/stdc++.h>
using namespace std;
long long int sum = 0;
long long int cum = 0;
int n;
long long int a = 0;
long long int b = 0;
int child[200008];
vector<int> v[200008];
void dfs(int i, int par, int level) {
  int k, l;
  if (level == 0)
    a++;
  else
    b++;
  int ch = 0;
  for (auto j : v[i]) {
    if (j == par) continue;
    if (level == 0)
      dfs(j, i, 1);
    else
      dfs(j, i, 0);
    ch = ch + child[j];
  }
  ch = ch + 1;
  child[i] = ch;
  long long int dk = n - ch;
  sum = sum + (dk * ch);
  return;
}
int main() {
  cin >> n;
  int i, j, k, l;
  for (i = 1; i < n; i++) {
    cin >> j >> k;
    v[j].push_back(k);
    v[k].push_back(j);
  }
  dfs(1, 0, 0);
  cum = (a * b);
  sum = (sum + cum) / 2;
  cout << sum << endl;
  return 0;
}
