#include <bits/stdc++.h>
using namespace std;
inline long long max(long long zxy_FIR, long long zxy_SEC) {
  return zxy_FIR > zxy_SEC ? zxy_FIR : zxy_SEC;
}
inline long long min(long long zxy_FIR, long long zxy_SEC) {
  return zxy_FIR > zxy_SEC ? zxy_SEC : zxy_FIR;
}
inline long long rd() {
  long long x = 0;
  int ch = getchar();
  bool f = 1;
  while (!isdigit(ch) && (ch != '-') && (ch != EOF)) ch = getchar();
  if (ch == '-') {
    f = 0;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 1) + (x << 3) + ch - '0';
    ch = getchar();
  }
  return f ? x : -x;
}
void write(long long prt_x) {
  if (prt_x >= 10)
    write(prt_x / 10), putchar(prt_x % 10 + '0');
  else
    putchar(prt_x + '0');
}
inline void wrt(long long prt_x, char prt_c) {
  if (prt_x < 0) putchar('-'), prt_x = -prt_x;
  write(prt_x);
  if (prt_c) putchar(prt_c);
}
int hd[200005 << 1], to[200005 << 1], nx[200005 << 1], cnt;
inline void add(int u, int v) { to[++cnt] = v, nx[cnt] = hd[u], hd[u] = cnt; }
int n;
long long sz[200005];
long long dp[200005][2];
long long sum;
void dfs(int u, int fa) {
  sz[u] = 1;
  for (int i = hd[u]; i; i = nx[i])
    if (to[i] != fa) {
      dfs(to[i], u);
      sz[u] += sz[to[i]];
      sum += sz[to[i]] * (n - sz[to[i]]);
      dp[u][0] += dp[to[i]][1];
      dp[u][1] += dp[to[i]][0];
    }
  dp[u][0]++;
}
int main() {
  n = rd();
  for (int i = int(1); i <= (int)(n - 1); i++) {
    int x = rd(), y = rd();
    add(x, y);
    add(y, x);
  }
  dfs(1, 0);
  wrt((1 + sum + (dp[1][0] * dp[1][1])) >> 1, '\n');
}
