#include <bits/stdc++.h>
#pragma GCC optimize "03"
using namespace std;
const long long int N = 2e5 + 5;
const long long int mod = 1e9 + 7;
long long int e[N], o[N], sz[N];
vector<long long int> g[N];
void dfs(long long int u, long long int p) {
  for (auto i : g[u]) {
    if (i == p) continue;
    dfs(i, u);
    sz[u] += sz[i];
  }
  sz[u]++;
}
long long int ans = 0, ans2 = 0, n;
void dfs1(long long int u, long long int p) {
  e[u] = 1;
  o[u] = 0;
  for (auto i : g[u]) {
    if (i == p) continue;
    dfs1(i, u);
    ans += sz[i] * (n - sz[i]);
    ans2 += o[i] * o[u];
    ans2 += e[i] * e[u];
    o[u] += e[i];
    e[u] += o[i];
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long long int i = 1; i <= n - 1; i++) {
    long long int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(1, 0);
  dfs1(1, 0);
  cout << (ans + ans2) / 2;
  return 0;
}
