#include <bits/stdc++.h>
using namespace std;
long long even[200005];
long long odd[200005];
long long seven[200005];
long long sodd[200005];
vector<int> adj[200005];
void dfs1(int cur, int prev) {
  for (int i = 0; i < adj[cur].size(); i++) {
    int v = adj[cur][i];
    if (v != prev) {
      dfs1(v, cur);
      odd[cur] += even[v];
      even[cur] += odd[v];
      odd[cur]++;
      seven[cur] += (sodd[v] + odd[v]);
      sodd[cur] += (seven[v] + even[v]);
      sodd[cur]++;
    }
  }
}
void dfs2(int cur, int prev) {
  long long o = 0, e = 0, so = 0, se = 0;
  o = odd[prev] - 1 - even[cur];
  e = even[prev] - odd[cur];
  so = sodd[prev] - seven[cur] - even[cur] - 1;
  se = seven[prev] - sodd[cur] - odd[cur];
  seven[cur] += (so + o);
  sodd[cur] += (se + e);
  sodd[cur]++;
  odd[cur] += e;
  odd[cur]++;
  even[cur] += o;
  for (int i = 0; i < adj[cur].size(); i++) {
    int v = adj[cur][i];
    if (v != prev) {
      dfs2(v, cur);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  for (int i = 0; i < 200005; i++) {
    even[i] = 0;
    odd[i] = 0;
    seven[i] = 0;
    sodd[i] = 0;
  }
  int n;
  cin >> n;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs1(1, 0);
  for (int i = 0; i < adj[1].size(); i++) {
    dfs2(adj[1][i], 1);
  }
  long long o = 0, e = 0, so = 0, se = 0;
  for (int i = 1; i <= n; i++) {
    o += odd[i];
    e += even[i];
    so += sodd[i];
    se += seven[i];
  }
  o /= 2;
  e /= 2;
  so /= 2;
  se /= 2;
  long long ans = (se / 2) + (so + o) / 2;
  cout << ans << endl;
  return 0;
}
