#include <bits/stdc++.h>
using namespace std;
int n;
int subsize[80055];
vector<int> g[80055];
long long res;
void dfs(int v, int par = -1) {
  subsize[v] = 1;
  for (auto u : g[v]) {
    if (u == par) continue;
    dfs(u, v);
    subsize[v] += subsize[u];
  }
  long long tot = 1ll * (n - subsize[v]) * (n - subsize[v] - 1) / 2;
  for (auto u : g[v]) {
    if (u == par) continue;
    tot += 1ll * subsize[u] * (subsize[u] - 1) / 2;
  }
  for (auto u : g[v]) {
    if (u == par) continue;
    res += 1ll * subsize[u] * (tot - 1ll * (subsize[u]) * (subsize[u] - 1) / 2);
  }
  res += 1ll * (n - subsize[v]) *
         (tot - 1ll * (n - subsize[v]) * (n - subsize[v] - 1) / 2);
  int cool = n - subsize[v];
  long long ac = 1ll * (n - subsize[v]) *
                 (tot - 1ll * (n - subsize[v]) * (n - subsize[v] - 1) / 2);
  for (auto u : g[v]) {
    if (u == par) continue;
    res += 1ll * subsize[u] *
           (ac - 1ll * subsize[u] * (subsize[u] - 1) / 2 * cool);
    ac += 1ll * subsize[u] * (tot - 1ll * subsize[u] * (subsize[u] - 1) / 2);
    cool += subsize[u];
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i + 1 < n; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    x--, y--;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  dfs(0);
  printf("%lld\n", res);
  return 0;
}
