#include <bits/stdc++.h>
using namespace std;
const int maxN = 80000 + 10;
int n, c[maxN];
vector<int> a[maxN];
long long res;
void visit(int u, int par = -1) {
  c[u] = 1;
  for (typeof(a[u].begin()) it = a[u].begin(); it != a[u].end(); it++)
    if (*it != par) {
      visit(*it, u);
      c[u] += c[*it];
    }
}
void revisit(int u, int par, long long dc, long long sc) {
  long long f1 = 1LL * (n - c[u]) * (n - c[u] - 1) / 2 + sc, ss = 1, f2 = 0, ne;
  for (typeof(a[u].begin()) it = a[u].begin(); it != a[u].end(); it++)
    if (*it != par) {
      f2 += ss * c[*it];
      ss += c[*it];
    }
  res += f1 * f2;
  for (typeof(a[u].begin()) it = a[u].begin(); it != a[u].end(); it++)
    if (*it != par) {
      ne = c[u] - c[*it];
      ss -= c[*it];
      revisit(*it, u, dc + ne, sc + ss * dc + f2 - ss * c[*it]);
      ss += c[*it];
    }
}
int main() {
  scanf("%d", &n);
  int u, v;
  for (int i = 0; i < n - 1; i++) {
    scanf("%d%d", &u, &v);
    a[u].push_back(v);
    a[v].push_back(u);
  }
  visit(1, -1);
  res = 0;
  revisit(1, -1, 0LL, 0LL);
  printf("%I64d\n", res);
  return 0;
}
