#include <bits/stdc++.h>
using namespace std;
int n;
int visited[200010];
long long dp[200010][2];
long long dp2[200010];
long long dp3[200010];
long long ans = 0;
vector<int> edge[200010];
void dfs(int u) {
  for (int i = 0; i < edge[u].size(); i++) {
    int v = edge[u][i];
    if (visited[v]) continue;
    visited[v] = visited[u] + 1;
    dfs(v);
    dp[u][0] += dp[v][1];
    dp[u][1] += dp[v][0];
    dp3[u] += dp3[v];
    dp3[u] += dp[v][1];
    dp2[u] += dp2[v] + dp[v][0] + dp[v][1];
  }
  long long sum = 0, sum2 = 0, sum3 = 0;
  for (int i = 0; i < edge[u].size(); i++) {
    int v = edge[u][i];
    if (visited[u] > visited[v]) continue;
    sum3 += (dp3[u] - dp[v][1] - dp3[v]) * (dp[v][0] + dp[v][1]);
    sum2 += (dp[u][1] - dp[v][0]) * dp[v][0];
    sum += (dp2[u] - dp2[v] - dp[v][0] - dp[v][1]) * (dp[v][0] + dp[v][1]);
    sum += (dp[u][0] + dp[u][1] - dp[v][0] - dp[v][1]) *
           (dp2[v] + dp[v][0] + dp[v][1]);
  }
  ans -= sum3;
  ans -= sum2 / 2;
  ans += sum / 2;
  ans -= dp3[u];
  ans += dp2[u];
  dp[u][0] += 1;
}
int main() {
  visited[1] = 1;
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    edge[x].push_back(y);
    edge[y].push_back(x);
  }
  dfs(1);
  printf("%lld\n", ans);
  return 0;
}
