#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 1;
long long n;
vector<long long> g[N];
long long sum_odd[N], sum_even[N];
long long count_odd[N], count_even[N];
void dfs1(long long v, long long p) {
  count_even[v] = 1;
  sum_even[v] = 0;
  for (auto u : g[v]) {
    if (u == p) continue;
    dfs1(u, v);
    count_odd[v] += count_even[u];
    count_even[v] += count_odd[u];
    sum_even[v] += (sum_odd[u] + 2 * count_odd[u]);
    sum_odd[v] += sum_even[u];
  }
}
void dfs2(long long v, long long p) {
  for (auto u : g[v]) {
    if (u == p) continue;
    long long odd_count = count_even[v] - count_odd[u];
    long long odd_sum = sum_even[v] - (sum_odd[u] + 2 * count_odd[u]);
    count_odd[u] += odd_count;
    sum_odd[u] += odd_sum;
    long long even_count = count_odd[v] - count_even[u];
    long long even_sum = sum_odd[v] - sum_even[u] + 2 * even_count;
    count_even[u] += even_count;
    sum_even[u] += even_sum;
    dfs2(u, v);
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long long i = 1; i < n; i++) {
    long long u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs1(1, 0);
  dfs2(1, 0);
  long long ans = 0;
  for (long long i = 1; i <= n; i++) {
    ans = ans + sum_even[i] / 2;
    ans = ans + sum_odd[i] / 2 + count_odd[i];
  }
  ans /= 2;
  cout << ans;
  return 0;
}
