#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxn = 2e5 + 5;
struct node {
  int u, v, ne;
} e[maxn << 1];
int n;
int head[maxn], len;
int ve[maxn], b[maxn];
void add(int u, int v) {
  e[len].u = u;
  e[len].v = v;
  e[len].ne = head[u];
  head[u] = len++;
}
void dfs(int x, int p, int k) {
  ve[x] = 1;
  b[x] = k;
  for (int i = head[x]; ~i; i = e[i].ne) {
    int v = e[i].v;
    if (v == p) continue;
    dfs(v, x, k ^ 1);
    ve[x] += ve[v];
  }
  return;
}
int main() {
  memset(head, -1, sizeof(head));
  cin >> n;
  for (int i = 1, x, y; i < n; i++) {
    scanf("%d %d", &x, &y);
    add(x, y);
    add(y, x);
  }
  dfs(1, 0, 0);
  long long ans = 0, sum = 0;
  for (int i = 1; i <= n; i++) {
    ans += 1ll * ve[i] * (n - ve[i]);
    sum += b[i];
  }
  ans += sum * (n - sum);
  cout << ans / 2 << endl;
  return 0;
}
