#include <bits/stdc++.h>
using namespace std;
const int N = 80020;
int nex[N * 2], head[N], to[N * 2];
int siz[N], fa[N];
int cnt;
void add(int x, int y) {
  nex[++cnt] = head[x];
  head[x] = cnt;
  to[cnt] = y;
}
void dfs(int u, int pre) {
  siz[u] = 1;
  fa[u] = pre;
  for (int i = head[u]; i; i = nex[i]) {
    int v = to[i];
    if (v == pre) continue;
    dfs(v, u);
    siz[u] += siz[v];
  }
}
long long C(int n) { return 1LL * n * (n - 1) / 2; }
int main() {
  int n, x, y;
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    add(x, y);
    add(y, x);
  }
  dfs(1, 0);
  long long ans = C(n) * C(n);
  for (x = 1; x <= n; x++) {
    long long num1 = C(n), num2 = C(siz[x]);
    for (int i = head[x]; i; i = nex[i]) {
      y = to[i];
      if (y != fa[x]) {
        num1 -= C(siz[y]);
        num2 -= C(siz[y]);
      } else
        num1 -= C(n - siz[x]);
    }
    ans -= 2LL * num1 * num2 - num2 * num2;
  }
  printf("%lld\n", ans);
  return 0;
}
