#include <bits/stdc++.h>
using namespace std;
int64_t n;
vector<vector<int64_t> > v;
vector<int64_t> d;
int64_t cnt = 0, ans = 0;
int64_t rec(int64_t t, int64_t p, int64_t len) {
  if (len % 2) ++cnt;
  int64_t A = 1;
  for (int64_t i = 0; i < v[t].size(); ++i)
    if (v[t][i] != p) A += rec(v[t][i], t, len + 1);
  ans += A * (n - A);
  return A;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  v.resize(n);
  for (int64_t i = 0; i < n - 1; ++i) {
    int64_t a, b;
    cin >> a >> b;
    v[a - 1].push_back(b - 1);
    v[b - 1].push_back(a - 1);
  }
  rec(0, -1, 0);
  cout << (ans + cnt * (n - cnt)) / 2;
}
