#include <bits/stdc++.h>
using namespace std;
const int N = 88000;
int n, son[N];
unsigned long long ans, allw, c2[N], w[N];
vector<int> e[N];
void dfs(int u) {
  son[u] = 0;
  w[u] = 0;
  for (__typeof((e[u]).begin()) it = (e[u]).begin(); it != (e[u]).end(); it++) {
    int v = *it;
    if (son[v] != -1) continue;
    dfs(v);
    son[u] += son[v] + 1;
    int pv = son[v] + 1;
    int pu = n - pv;
    ans += (c2[pu] + w[v] - allw) * (c2[pv] - w[v]);
    w[u] += c2[pv];
    allw += c2[pv] - w[v];
  }
}
int main() {
  c2[0] = c2[1] = 0;
  for (unsigned long long i = 2; i < N; i++) c2[i] = i * (i - 1) / 2;
  cin >> n;
  for (int asdfg = 0; asdfg < (n - 1); asdfg++) {
    int u, v;
    cin >> u >> v;
    e[u].push_back(v);
    e[v].push_back(u);
  }
  allw = ans = 0;
  int root = n / 2;
  memset(son, -1, sizeof(son));
  dfs(root);
  cout << ans * 2 << endl;
  return 0;
}
