#include <bits/stdc++.h>
namespace fastIO {
bool IOerror = 0;
inline char nc() {
  static char buf[100000], *p1 = buf + 100000, *pend = buf + 100000;
  if (p1 == pend) {
    p1 = buf;
    pend = buf + fread(buf, 1, 100000, stdin);
    if (pend == p1) {
      IOerror = 1;
      return -1;
    }
  }
  return *p1++;
}
inline bool blank(char ch) {
  return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t';
}
inline void read(int &x) {
  bool sign = 0;
  char ch = nc();
  x = 0;
  for (; blank(ch); ch = nc())
    ;
  if (IOerror) return;
  if (ch == '-') sign = 1, ch = nc();
  for (; ch >= '0' && ch <= '9'; ch = nc()) x = x * 10 + ch - '0';
  if (sign) x = -x;
}
inline void read(long long &x) {
  bool sign = 0;
  char ch = nc();
  x = 0;
  for (; blank(ch); ch = nc())
    ;
  if (IOerror) return;
  if (ch == '-') sign = 1, ch = nc();
  for (; ch >= '0' && ch <= '9'; ch = nc()) x = x * 10 + ch - '0';
  if (sign) x = -x;
}
};  // namespace fastIO
using namespace fastIO;
const long long MAXN = 200000 + 5;
struct Node {
  struct Edge *firstEdge;
  long long size;
  bool vis, used;
  long long f, dist;
  long long dp1, dp2;
} node[MAXN];
struct Edge {
  Node *s, *t;
  struct Edge *next;
} pool[MAXN * 2], *frog = pool;
Edge *New(Node *s, Node *t) {
  Edge *ret = ++frog;
  ret->s = s;
  ret->t = t;
  ret->next = s->firstEdge;
  return ret;
}
inline void add(long long u, long long v) {
  node[u].firstEdge = New(&node[u], &node[v]);
  node[v].firstEdge = New(&node[v], &node[u]);
}
long long ans = 0ll;
long long N;
void dfs1(Node *v) {
  v->vis = true;
  v->size = 1;
  for (Edge *e = v->firstEdge; e; e = e->next) {
    if (!e->t->vis) {
      e->t->dist = v->dist + 1;
      dfs1(e->t);
      v->size += e->t->size;
      v->f += e->t->f + e->t->size * (N - e->t->size);
    }
  }
}
signed main() {
  read(N);
  for (register long long i = 1; i <= N - 1; ++i) {
    long long u, v;
    read(u);
    read(v);
    add(u, v);
  }
  dfs1(&node[1]);
  long long a = 0, b = 0;
  for (register long long i = 1; i <= N; ++i) {
    if (node[i].dist & 1)
      a++;
    else
      b++;
  }
  long long sum = a * b;
  printf("%I64d\n", (node[1].f + sum + 1) / 2);
  return 0;
}
