#include <bits/stdc++.h>
using namespace std;
int to[2 * 100010], nxt[2 * 100010], head[100010], edge;
int sz[100010];
int p[100010], N;
unsigned long long ans, val[100010];
void add_edge(int u, int v) {
  to[edge] = v;
  nxt[edge] = head[u];
  head[u] = edge++;
  to[edge] = u;
  nxt[edge] = head[v];
  head[v] = edge++;
  return;
}
void dfs(int u) {
  int v;
  unsigned long long res;
  sz[u] = 1;
  for (int ID = head[u]; ID != -1; ID = nxt[ID]) {
    v = to[ID];
    if (v == p[u]) continue;
    p[v] = u;
    dfs(v);
    sz[u] += sz[v];
  }
  res = 2 * (sz[u] - 1);
  for (int ID = head[u]; ID != -1; ID = nxt[ID]) {
    v = to[ID];
    if (v == p[u]) continue;
    res += (unsigned long long)(sz[u] - 1 - sz[v]) * sz[v];
  }
  res /= 2;
  val[u] = res;
  res = res * ((unsigned long long)(N - sz[u]) * (N - sz[u] - 1) / 2);
  ans += res;
  return;
}
void dfs1(int u, unsigned long long va) {
  for (int ID = head[u]; ID != -1; ID = nxt[ID]) {
    int v = to[ID];
    if (v == p[u]) continue;
    ans = ans + (va - (unsigned long long)(N - sz[v]) * sz[v]) * val[v];
    dfs1(v, va + val[v]);
  }
  return;
}
int main() {
  int u, v;
  scanf("%d", &N);
  memset(head, 0xff, sizeof(head));
  memset(p, 0xff, sizeof(p));
  for (int i = 0; i < N - 1; i++) {
    scanf("%d%d", &u, &v);
    u--;
    v--;
    add_edge(u, v);
  }
  dfs(0);
  dfs1(0, val[0]);
  printf("%I64u\n", ans);
  return 0;
}
