#include <bits/stdc++.h>
using namespace std;
inline int gi() {
  int data = 0, m = 1;
  char ch = 0;
  while (ch != '-' && (ch < '0' || ch > '9')) ch = getchar();
  if (ch == '-') {
    m = 0;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    data = (data << 1) + (data << 3) + (ch ^ 48);
    ch = getchar();
  }
  return (m) ? data : -data;
}
int sz[200005], f[200005][2], n;
long long Ans, Ans2;
struct _Edge {
  int to, next;
} Edge[200005 << 1];
int head[200005], CNT;
inline void AddEdge(int u, int v) {
  Edge[++CNT] = (_Edge){v, head[u]};
  head[u] = CNT;
  return;
}
void Dfs1(int u, int From) {
  sz[u] = 1;
  for (int e = head[u]; e; e = Edge[e].next) {
    int v = Edge[e].to;
    if (v == From) continue;
    Dfs1(v, u);
    sz[u] += sz[v];
    Ans = Ans + 1ll * (n - sz[v]) * sz[v];
  }
  return;
}
void Dfs2(int u, int From) {
  f[u][0] = 1;
  f[u][1] = 0;
  for (int e = head[u]; e; e = Edge[e].next) {
    int v = Edge[e].to;
    if (v == From) continue;
    Dfs2(v, u);
    Ans2 += 1ll * f[v][0] * f[u][0];
    Ans2 += 1ll * f[v][1] * f[u][1];
    f[u][0] += f[v][1];
    f[u][1] += f[v][0];
  }
  return;
}
int main() {
  n = gi();
  for (int i = 1, u, v; i < n; i++)
    u = gi(), v = gi(), AddEdge(u, v), AddEdge(v, u);
  Ans = 0;
  Dfs1(1, 0);
  Dfs2(1, 0);
  Ans /= 2;
  if (Ans2 % 2 == 0)
    Ans += Ans2 / 2;
  else if (Ans2 % 2 == 1)
    Ans += Ans2 / 2 + 1;
  cout << Ans << endl;
  return 0;
}
