#include <bits/stdc++.h>
using namespace std;
const int NMAX = 100005;
vector<int> tree[NMAX];
long long count2[NMAX];
int n;
long long ans;
void dfs(int v, int parent) {
  count2[v] = 1;
  for (int i = 0; i < int((tree[v]).size()); ++i) {
    int u = tree[v][i];
    if (u == parent) continue;
    dfs(u, v);
    count2[v] += count2[u];
  }
}
void calc(int v, int parent, long long sum) {
  vector<int> adj;
  for (int i = 0; i < int((tree[v]).size()); ++i) {
    int u = tree[v][i];
    if (u == parent) continue;
    adj.push_back(u);
  }
  long long st = 0;
  for (int u : adj) {
    st += count2[u] * (count2[v] - 1 - count2[u]);
  }
  st /= 2;
  st += count2[v] - 1;
  ans += st * ((n - count2[v]) * (n - count2[v] - 1) / 2 + sum);
  long long s = count2[v] - 1;
  long long pc = n - count2[v];
  long long ss = 0;
  for (int u : adj) {
    ss += count2[u] * count2[u];
  }
  for (int u : adj) {
    long long t = (s * s - ss) / 2 + n - count2[u] - 1 + s * pc -
                  s * count2[u] - pc * count2[u] + count2[u] * count2[u];
    calc(u, v, sum + max(t, 0ll));
  }
}
void solve() {
  cin >> n;
  for (int i = 0; i < int(n - 1); ++i) {
    int u, v;
    cin >> u >> v;
    --u, --v;
    tree[u].push_back(v);
    tree[v].push_back(u);
  }
  dfs(0, -1);
  calc(0, -1, 0);
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  solve();
  return 0;
}
