#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 200005;
long long n, ans;
long long cnt[2];
vector<int> e[MAX_N];
long long DFS(int id, int pre, int col);
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  int u, v;
  for (int i = 1; i < n; ++i) {
    cin >> u >> v;
    e[u].push_back(v);
    e[v].push_back(u);
  }
  DFS(1, 0, 0);
  ans = (ans + cnt[0] * cnt[1]) / 2;
  cout << ans << endl;
  return 0;
}
long long DFS(int id, int pre, int col) {
  col = (col + 1) % 2;
  ++cnt[col];
  long long sum = 1;
  for (auto c : e[id])
    if (c != pre) sum += DFS(c, id, col);
  ans += sum * (n - sum);
  return sum;
}
