#include <bits/stdc++.h>
using namespace std;
const int MAXN = 111111;
int n, cot, par[MAXN], size[MAXN];
long long u[MAXN];
vector<int> adj[MAXN];
void dfs(int v, int p) {
  par[v] = p;
  int temp = cot;
  cot++;
  for (int i = 0; i < (int)adj[v].size(); ++i) {
    if (adj[v][i] == par[v]) continue;
    dfs(adj[v][i], v);
  }
  size[v] = cot - temp;
}
long long c2(long long x) { return (x * (x - 1)) >> 1; }
int main() {
  scanf("%d", &n);
  for (int i = 0; i < (int)n - 1; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  cot = 0;
  dfs(1, 0);
  long long ans1 = 0;
  for (int v = 1; v <= n; ++v) {
    int k = 0;
    for (int i = 0; i < (int)adj[v].size(); ++i) {
      if (adj[v][i] == par[v]) continue;
      u[++k] = ((long long)size[adj[v][i]]);
    }
    long long sum = 0, sumsquare = 0;
    for (int i = 1; i <= k; ++i) sum += u[i], sumsquare += u[i] * u[i];
    ans1 += c2((long long)(n - size[v])) *
            ((long long)(size[v] - 1) + (sum * sum - sumsquare) / 2LL);
  }
  long long ans2 = 0;
  for (int v = 1; v <= n; ++v) {
    int k = 0;
    for (int i = 0; i < (int)adj[v].size(); ++i) {
      if (adj[v][i] == par[v]) continue;
      u[++k] = c2((long long)size[adj[v][i]]);
    }
    long long sum = 0, sumsquare = 0;
    for (int i = 1; i <= k; ++i) sum += u[i], sumsquare += u[i] * u[i];
    ans2 += (sum * sum - sumsquare) / 2;
  }
  printf("%I64d\n", 2 * (ans1 - ans2));
  return 0;
}
