#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
vector<int> adj[200005];
long long su[200005][2];
long long cnt[200005][2];
long long result = 0;
void go(int v, int p = -1) {
  ++cnt[v][0];
  for (int u : adj[v])
    if (u != p) {
      go(u, v);
      for (int vk = 0; vk < (2); ++vk)
        for (int uk = 0; uk < (2); ++uk) {
          result +=
              su[v][vk] * cnt[u][uk] + (su[u][uk] + cnt[u][uk]) * cnt[v][vk];
          if (vk == uk) result += cnt[u][uk] * cnt[v][vk];
        }
      for (int k = 0; k < (2); ++k) {
        cnt[v][1 - k] += cnt[u][k];
        su[v][1 - k] += cnt[u][k] + su[u][k];
      }
    }
}
int main() {
  int N;
  scanf("%d", &N);
  for (int i = 0; i < (N - 1); ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    --u, --v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  go(0);
  result /= 2;
  cout << result << endl;
}
