#include <bits/stdc++.h>
using namespace std;
const int Len = 2333333, mn = 2e5 + 5;
char buf[Len], *p1 = buf, *p2 = buf, duf[Len], *q1 = duf;
inline char gc();
inline int rd();
inline void pc(char c);
inline void rt(long long x);
inline void flush();
int n, cnt, u, v, h[mn], s[mn], dp[3][mn];
long long ans;
struct E {
  int to, nxt;
} e[mn << 1];
inline void Add(int u, int v) { e[++cnt] = (E){v, h[u]}, h[u] = cnt; }
void Dfs(int u, int fa) {
  s[u] = dp[0][u] = 1;
  for (register int i = h[u]; i; i = e[i].nxt) {
    int v = e[i].to;
    if (v != fa)
      Dfs(v, u), s[u] += s[v], ans += 1ll * s[v] * (n - s[v]),
          dp[0][u] += dp[1][v], dp[1][u] += dp[0][v];
  }
}
int main() {
  n = rd();
  for (register int i = 2; i <= n; ++i)
    u = rd(), v = rd(), Add(u, v), Add(v, u);
  Dfs(1, 0);
  rt((ans + 1 + 1ll * dp[0][1] * dp[1][1]) / 2ll);
  return flush(), 0;
}
inline char gc() {
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, Len, stdin), p1 == p2)
             ? -1
             : *p1++;
}
inline int rd() {
  char c;
  int f = 1;
  while (!isdigit(c = gc()) && c != '-')
    ;
  c == '-' ? f = -1, c = gc() : 0;
  int x = c ^ 48;
  while (isdigit(c = gc())) x = ((x + (x << 2)) << 1) + (c ^ 48);
  return x * f;
}
inline void pc(char c) {
  q1 == duf + Len &&fwrite(q1 = duf, 1, Len, stdout), *q1++ = c;
}
inline void rt(long long x) {
  x < 0 ? pc('-'), x = -x : 0, pc((x >= 10 ? rt(x / 10), x % 10 : x) + 48);
}
inline void flush() { fwrite(duf, 1, q1 - duf, stdout); }
