#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
int N;
vector<int> adj[200005];
long long even = 0, odd = 0, ans = 0, numodd = 0;
int sub[2][200005];
int up[2][200005];
void dfs(int s, int p) {
  sub[0][s] = 1;
  sub[1][s] = 0;
  for (auto v : adj[s]) {
    if (v == p) continue;
    dfs(v, s);
    sub[0][s] += sub[1][v];
    sub[1][s] += sub[0][v];
  }
}
void dfs2(int s, int p) {
  if (s == 1) {
    up[0][s] = 1;
    up[1][s] = 0;
  } else {
    up[0][s] = up[1][p] + sub[1][p] - sub[0][s] + 1;
    up[1][s] = up[0][p] + sub[0][p] - 1 - sub[1][s];
  }
  numodd += sub[1][s] + up[1][s];
  for (auto v : adj[s]) {
    if (v == p) continue;
    dfs2(v, s);
    even += 1LL * (up[0][v] - 1) * sub[0][v] + 1LL * up[1][v] * sub[1][v];
    odd += 1LL * (up[0][v] - 1) * sub[1][v] + 1LL * up[1][v] * sub[0][v];
  }
}
int main() {
  cin >> N;
  for (int i = 0; i < N - 1; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs(1, 0);
  dfs2(1, 0);
  assert(numodd % 2 == 0);
  numodd /= 2;
  cout << (odd + numodd) / 2 + even / 2 << endl;
  return 0;
}
