#include <bits/stdc++.h>
using namespace std;
int stmp;
const int MAX = 80000;
const int INF = 1000000001;
vector<int> G[MAX];
long long size[MAX];
int n;
long long res;
inline long long c2(long long k) { return k * (k - 1) / 2; }
int dfs_size(int v, int p) {
  size[v] = 1;
  for (__typeof((G[v]).begin()) u = (G[v]).begin(); u != (G[v]).end(); ++u)
    if (*u != p) size[v] += dfs_size(*u, v);
  return size[v];
}
void cnt1(int v, int p) {
  long long s = 0;
  for (__typeof((G[v]).begin()) u = (G[v]).begin(); u != (G[v]).end(); ++u)
    if (*u != p) s += c2(size[*u]);
  for (__typeof((G[v]).begin()) u = (G[v]).begin(); u != (G[v]).end(); ++u)
    if (*u != p) res += (s - c2(size[*u])) * c2(size[*u]);
  for (__typeof((G[v]).begin()) u = (G[v]).begin(); u != (G[v]).end(); ++u)
    if (*u != p) cnt1(*u, v);
}
void cnt2(int v, int p) {
  long long s = 0;
  for (__typeof((G[v]).begin()) u = (G[v]).begin(); u != (G[v]).end(); ++u)
    if (*u != p) s += size[*u];
  long long t = 0;
  for (__typeof((G[v]).begin()) u = (G[v]).begin(); u != (G[v]).end(); ++u)
    if (*u != p) t += (s - size[*u]) * size[*u];
  t /= 2;
  for (__typeof((G[v]).begin()) u = (G[v]).begin(); u != (G[v]).end(); ++u)
    if (*u != p) {
      res += (size[v] - size[*u] - 1) * ((long long)n - size[v]) *
             c2(size[*u]) * 2LL;
      res += ((long long)n - size[*u] - 1) * c2(size[*u]) * 2LL;
      res += c2(size[*u]) * (t - ((s - size[*u]) * size[*u])) * 2LL;
    }
  for (__typeof((G[v]).begin()) u = (G[v]).begin(); u != (G[v]).end(); ++u)
    if (*u != p) cnt2(*u, v);
}
int main(int argc, char *argv[]) {
  ios_base::sync_with_stdio(0);
  cin >> n;
  if (n == 1) {
    cout << 0 << endl;
    return 0;
  }
  for (int foo = 0; foo < (n - 1); ++foo) {
    int a, b;
    cin >> a >> b;
    --a, --b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  int r = 0;
  while (((int)(G[r]).size()) != 1) ++r;
  dfs_size(r, r);
  cnt1(r, r);
  for (__typeof((G[r]).begin()) u = (G[r]).begin(); u != (G[r]).end(); ++u)
    cnt2(*u, r);
  cout << res << endl;
  return 0;
}
