#include <bits/stdc++.h>
using namespace std;
inline long long qr() {
  long long x = 0, f = 1;
  char ch;
  while (!isdigit(ch = getchar()))
    if (ch == '-') f = -1;
  for (; isdigit(ch); x = x * 10 + ch - 48, ch = getchar())
    ;
  return x * f;
}
const int N = 80010;
int n, sz[N], f[N];
vector<int> g[N];
void dfs(int u, int ff) {
  sz[u] = 1;
  f[u] = ff;
  for (int i = 0; i < g[u].size(); ++i) {
    int v = g[u][i];
    if (v != ff) dfs(v, u), sz[u] += sz[v];
  }
}
long long C(long long n) { return n * (n - 1) / 2; }
int main() {
  n = qr();
  for (int i = 2; i <= n; ++i) {
    int x = qr(), y = qr();
    g[x].push_back(y);
    g[y].push_back(x);
  }
  dfs(1, 0);
  long long ans = C(n) * C(n);
  for (int u = 1; u <= n; ++u) {
    long long x1 = C(n), x2 = C(sz[u]);
    for (int i = 0; i < g[u].size(); ++i) {
      int v = g[u][i];
      if (v != f[u])
        x1 -= C(sz[v]), x2 -= C(sz[v]);
      else
        x1 -= C(n - sz[u]);
    }
    ans -= 2LL * x1 * x2 - x2 * x2;
  }
  printf("%lld\n", ans);
  return 0;
}
