#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000 + 7;
const long long LL_INF = 1ll * INF * INF;
const int MAX_N = 200000 + 7;
template <typename T>
inline void addmod(T& a, const long long& b, const int& MOD = INF) {
  a = (a + b) % MOD;
  if (a < 0) a += MOD;
}
long long total = 0;
long long odd = 0;
long long sum[MAX_N][2];
int n;
vector<int> adj[MAX_N];
int f[MAX_N];
void dfs(int u, int r) {
  f[u] = 1;
  sum[u][0] = 1;
  sum[u][1] = 0;
  for (int v : adj[u])
    if (v != r) {
      dfs(v, u);
      f[u] += f[v];
      total += 1ll * f[v] * (n - f[v]);
      for (int p = (0), _b = (2); p < _b; ++p)
        for (int q = (0), _b = (2); q < _b; ++q) {
          int cur = p ^ q;
          cur ^= 1;
          if (cur == 1) odd += sum[u][p] * sum[v][q];
        }
      sum[u][0] += sum[v][1];
      sum[u][1] += sum[v][0];
    }
}
void solve() {
  cin >> n;
  for (int i = (1), _b = (n); i < _b; ++i) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs(1, -1);
  cout << total - (total - odd) / 2;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  const bool multiple_test = false;
  int test = 1;
  if (multiple_test) cin >> test;
  for (int i = 0; i < test; ++i) {
    solve();
  }
}
