#include <bits/stdc++.h>
using namespace std;
const int MAXN = 80005;
long long n, ans, acc_paths;
vector<int> graph[MAXN];
long long dfs(int u, int p) {
  long long cur_paths = acc_paths;
  long long sz = 1, paths = 0;
  for (int k = 0, v, ch_sz; k < graph[u].size(); ++k) {
    v = graph[u][k];
    if (v == p) continue;
    ch_sz = dfs(v, u);
    paths += sz * ch_sz;
    sz += ch_sz;
  }
  ans += (paths * (n - sz) * (n - sz - 1LL)) >> 1;
  ans -= paths * cur_paths;
  acc_paths += paths;
  return sz;
}
int main() {
  scanf("%I64d", &n);
  for (int i = 1, a, b; i < n; ++i) {
    scanf("%d %d", &a, &b);
    graph[a].push_back(b);
    graph[b].push_back(a);
  }
  dfs(1, -1);
  printf("%I64d\n", ans << 1);
  return 0;
}
