#include <bits/stdc++.h>
using namespace std;
int n;
long long s[90000];
long long ans;
vector<int> e[90000];
void dfs(int u, int p) {
  for (int i = 0, len = e[u].size(); i < len; ++i) {
    if (e[u][i] == p) continue;
    dfs(e[u][i], u);
    s[u] += s[e[u][i]];
  }
  s[u]++;
  long long cnt = s[u] - 1;
  for (int i = 0, len = e[u].size(); i < len; ++i) {
    if (e[u][i] == p) continue;
    cnt += s[e[u][i]] * (s[u] - s[e[u][i]]);
  }
  cnt /= 2;
  ans -= cnt * cnt + cnt * s[u] * (n - s[u]) * 2;
}
int main() {
  while (cin >> n) {
    for (int i = 0; i < n; ++i) e[i].clear();
    int x, y;
    for (int i = 1; i < n; ++i) {
      cin >> x >> y;
      e[x].push_back(y);
      e[y].push_back(x);
    }
    ans = (long long)n * (long long)(n - 1) / 2;
    ans = ans * ans;
    memset(s, 0LL, sizeof(s));
    dfs(1, 0);
    cout << ans << endl;
  }
  return 0;
}
