#include <bits/stdc++.h>
using namespace std;
unsigned long long f[100000];
unsigned long long ans;
vector<int> E[100000];
int N;
void dfs(int now, int fa) {
  int i;
  f[now] = 1;
  unsigned long long sum = 0, doublesum = 0, minus = 0, inminus = 0;
  for (i = 0; i < E[now].size(); i++) {
    int son = E[now][i];
    if (son == fa) continue;
    dfs(son, now);
    f[now] += f[son];
    sum += (f[son]);
    doublesum += (f[son]) * (f[son]);
  }
  unsigned long long tmp = sum * sum - doublesum;
  tmp /= 2;
  for (i = 0; i < E[now].size(); i++) {
    int son = E[now][i];
    if (son == fa) continue;
    unsigned long long t = f[son];
    minus += t * (f[now]) * (N - f[now]) * 2;
    minus += t * t * (f[now] - t - 1) * 2;
    minus += t * (f[now] - t - 1);
    minus += t * (tmp - t * (f[now] - t - 1)) * 2;
    inminus += t * t;
  }
  ans -= tmp * tmp;
  ans -= minus;
  ans -= inminus;
  ans -= tmp * f[now] * (N - f[now]) * 2;
}
int main() {
  int i, a, b;
  while (scanf("%d", &N) != EOF) {
    ans = 1;
    ans = ans * N * (N - 1) / 2;
    ans *= ans;
    for (i = 0; i < N; i++) E[i].clear();
    for (i = 0; i < N - 1; i++) {
      scanf("%d%d", &a, &b);
      a--, b--;
      E[a].push_back(b);
      E[b].push_back(a);
    }
    dfs(0, -1);
    cout << ans << endl;
  }
}
