#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
const double PI = acos(-1.0);
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long n;
const long long N = 80000 + 500;
vector<long long> adj[N];
long long sz[N];
long long fa[N];
long long ans;
void dfs1(long long node, long long par) {
  sz[node] = 1;
  fa[node] = par;
  for (auto x : adj[node]) {
    if (x == par) continue;
    dfs1(x, node);
    sz[node] += sz[x];
  }
}
long long C(long long x) { return (x * (x - 1)) / 2; }
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (long long i = 1; i < n; i++) {
    long long u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs1(1, 0);
  long long ans = C(n) * C(n);
  for (long long i = 1; i <= n; i++) {
    long long num1 = C(n), num2 = C(sz[i]);
    for (auto x : adj[i]) {
      if (x != fa[i]) {
        num1 -= C(sz[x]);
        num2 -= C(sz[x]);
      } else {
        num1 -= C(n - sz[i]);
      }
    }
    ans -= (2 * num1 * num2 - num2 * num2);
  }
  cout << ans << "\n";
}
