#include <bits/stdc++.h>
template <typename T>
inline T max(const T a, const T b) {
  return a > b ? a : b;
}
template <typename T>
inline T min(const T a, const T b) {
  return a < b ? a : b;
}
template <typename T>
inline void mind(T& a, const T b) {
  a = a < b ? a : b;
}
template <typename T>
inline void maxd(T& a, const T b) {
  a = a > b ? a : b;
}
template <typename T>
inline T abs(const T a) {
  return a > 0 ? a : -a;
}
template <typename T>
inline T gcd(const T a, const T b) {
  if (!b) return a;
  return gcd(b, a % b);
}
template <typename T>
inline T lcm(const T a, const T b) {
  return a / gcd(a, b) * b;
}
template <typename T>
inline T square(const T x) {
  return x * x;
};
template <typename T>
inline void read(T& x) {
  char cu = getchar();
  x = 0;
  bool fla = 0;
  while (!isdigit(cu)) {
    if (cu == '-') fla = 1;
    cu = getchar();
  }
  while (isdigit(cu)) x = x * 10 + cu - '0', cu = getchar();
  if (fla) x = -x;
}
template <typename T>
void printe(const T x) {
  if (x >= 10) printe(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
inline void print(const T x) {
  if (x < 0)
    putchar('-'), printe(-x);
  else
    printe(x);
}
int n;
int head[200001], nxt[400001], tow[400001], tmp;
inline void addb(const int u, const int v) {
  tmp++;
  nxt[tmp] = head[u];
  head[u] = tmp;
  tow[tmp] = v;
}
long long sum[200001];
int dis[200001][2];
long long ans;
void dfs(const int u, const int fa) {
  for (register int i = head[u]; i; i = nxt[i]) {
    const int v = tow[i];
    if (v != fa) {
      dfs(v, u);
      dis[u][0] += dis[v][1];
      dis[u][1] += dis[v][0];
      sum[u] += sum[v] + dis[v][0] + dis[v][1];
    }
  }
  dis[u][0]++;
}
void dfs2(const int u, const int fa) {
  for (register int i = head[u]; i; i = nxt[i]) {
    const int v = tow[i];
    if (v != fa) {
      sum[v] = sum[u] - dis[v][0] - dis[v][1] + n - dis[v][0] - dis[v][1];
      dis[v][0] = dis[u][1];
      dis[v][1] = dis[u][0];
      dfs2(v, u);
    }
  }
}
int main() {
  read(n);
  for (register int i = 1; i < n; i++) {
    int u, v;
    read(u), read(v);
    addb(u, v), addb(v, u);
  }
  dfs(1, 0);
  dfs2(1, 0);
  for (register int i = 1; i <= n; i++) {
    ans += (sum[i] + dis[i][1]) / 2;
  }
  print(ans / 2);
  return 0;
}
