#include <bits/stdc++.h>
using namespace std;
long long a[80000];
vector<int> b[80000];
int n, p1, p2;
long long ans = 0;
void dfs(int ps, int pa) {
  long long tmp, sum = 0;
  for (int i = 0; i < b[ps].size(); i++) {
    if (b[ps][i] != pa) {
      dfs(b[ps][i], ps);
      a[ps] += a[b[ps][i]];
      sum += a[b[ps][i]] * (a[b[ps][i]] - 1) / 2;
    }
  }
  a[ps]++;
  long long tmp1 = (n - a[ps]) * (n - a[ps] - 1) / 2;
  long long sum1 = 0;
  for (int i = 0; i < b[ps].size(); i++) {
    if (b[ps][i] != pa) {
      tmp = a[b[ps][i]] * (a[b[ps][i]] - 1) / 2;
      ans += ((n - a[b[ps][i]]) * (n - a[b[ps][i]] - 1) / 2 - tmp1) * tmp;
      sum1 += (sum - tmp) * tmp;
    }
  }
  ans -= sum1 / 2;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    scanf("%d %d", &p1, &p2);
    p1--;
    p2--;
    b[p1].push_back(p2);
    b[p2].push_back(p1);
  }
  dfs(0, -1);
  printf("%I64d\n", ans * 2);
}
