#include <bits/stdc++.h>
using namespace std;
const long long Maxn = 200000 + 20, inf = 0x3f3f3f3f;
vector<long long> e[Maxn];
long long s[Maxn], d[Maxn];
long long n, cnt, ans;
inline long long read() {
  long long s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    s = (s << 3) + (s << 1) + (ch ^ 48), ch = getchar();
  return s * w;
}
void dfs(long long x, long long fa) {
  s[x] = 1, d[x] = d[fa] + 1;
  for (long long i = 0; i < e[x].size(); ++i) {
    long long y = e[x][i];
    if (y == fa) continue;
    dfs(y, x);
    s[x] += s[y];
  }
}
int main() {
  n = read();
  for (long long i = 1; i < n; ++i) {
    long long x = read(), y = read();
    e[x].push_back(y);
    e[y].push_back(x);
  }
  dfs(1, 0);
  for (long long i = 1; i <= n; ++i) {
    ans += (s[i] * (n - s[i]));
    if (d[i] & 1) cnt++;
  }
  ans += (cnt * (n - cnt));
  ans >>= 1;
  printf("%I64d\n", ans);
  return 0;
}
