#include <bits/stdc++.h>
using namespace std;
vector<int> v[100010];
long long n;
long long ans = 0, cnt = 0;
pair<long long, long long> go(int cur, int par) {
  long long Sum = 0, subtree = 1, cur_cnt = 0;
  for (int u : v[cur]) {
    if (u == par) continue;
    pair<long long, long long> p = go(u, cur);
    cur_cnt += (subtree * p.second);
    Sum += p.first;
    subtree += p.second;
  }
  cnt += cur_cnt;
  ans += (cur_cnt * (n * (n - 1) / 2 - cnt - subtree * (n - subtree)));
  return make_pair(Sum + cur_cnt, subtree);
}
int main() {
  int i;
  scanf("%lld", &n);
  for (i = 0; i < n - 1; ++i) {
    int x, y;
    scanf("%d", &x);
    scanf("%d", &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  go(1, 0);
  printf("%lld\n", ans * 2);
}
