#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
int sz[N], col[2];
int n;
long long ans = 0, odd;
vector<int> V[N];
void dfs(int a, int fa, int zt) {
  sz[a] = 1;
  col[zt]++;
  for (int i = (0); i < (((int)(V[a]).size())); ++i) {
    int nxt = V[a][i];
    if (nxt == fa) continue;
    dfs(nxt, a, zt ^ 1);
    sz[a] += sz[nxt];
    ans += 1ll * sz[nxt] * (n - sz[nxt]);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = (1); i < (n); ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    V[a].push_back(b);
    V[b].push_back(a);
  }
  dfs(1, 1, 0);
  odd = 1ll * col[0] * col[1];
  cout << ans / 2 + (odd + 1) / 2 << "\n";
  return 0;
}
