#include <bits/stdc++.h>
using namespace std;
int n, size[80005];
vector<int> v[80005];
long long int bad;
long long int c2(int x) {
  long long int res = (1LL * x * (x - 1)) / 2;
  return res;
}
void dfs(int cur, int par) {
  size[cur] = 1;
  long long int paths = 0;
  for (int i = 0; i < v[cur].size(); i++) {
    int x = v[cur][i];
    if (x == par) continue;
    dfs(x, cur);
    size[cur] += size[x];
    paths += size[x];
  }
  long long int sum = 0;
  for (int i = 0; i < v[cur].size(); i++) {
    int x = v[cur][i];
    if (x == par) continue;
    paths += 1LL * sum * size[x];
    sum += size[x];
  }
  bad += 1LL * paths * paths;
  bad += 1LL * 2 * paths * size[cur] * (n - size[cur]);
}
int main() {
  ios::sync_with_stdio(false);
  ;
  cin.tie(0);
  ;
  int i, x, y;
  long long int total = 0;
  cin >> n;
  for (i = 1; i <= n - 1; i++) {
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  total = c2(n) * c2(n);
  dfs(1, -1);
  cout << total - bad;
  return 0;
}
