#include <bits/stdc++.h>
using namespace std;
const int N = 80005;
long long ans = 0ll;
int n, a[N];
vector<int> g[N];
void dfs(int u, int f) {
  a[u] = 1;
  long long in = 0ll;
  for (int i = 0; i < g[u].size(); ++i) {
    int v = g[u][i];
    if (v == f) continue;
    dfs(v, u);
    in += (long long)a[u] * a[v];
    a[u] += a[v];
  }
  ans -= in * (in + (long long)2 * a[u] * (n - a[u]));
}
int main() {
  scanf("%d", &n);
  int i;
  int x, y;
  for (i = 1; i < n; ++i) {
    scanf("%d%d", &x, &y);
    g[x].push_back(y);
    g[y].push_back(x);
  }
  ans = (long long)n * (n - 1) / 2;
  ans *= ans;
  dfs(1, 0);
  printf("%I64d", ans);
  return 0;
}
