#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 80001;
long long n;
vector<int> G[MAX_N];
long long dfs(int u, int fa, long long &cnt) {
  long long son = 1, in = 0;
  for (int i = 0; i < G[u].size(); ++i) {
    int v = G[u][i];
    if (v == fa) continue;
    long long x = dfs(v, u, cnt);
    in += son * x;
    son += x;
  }
  cnt += in * in + in * 2 * son * (n - son);
  return son;
}
void solve() {
  long long limit = (n * (n - 1) / 2) * (n * (n - 1) / 2);
  long long cnt = 0;
  long long x = dfs(1, -1, cnt);
  limit -= cnt;
  printf("%I64d\n", limit);
}
int main() {
  scanf("%I64d", &n);
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  solve();
  return 0;
}
