#include <bits/stdc++.h>
using namespace std;
const int INF = (1 << 30) - 1;
const long double EPS = 1e-9;
const long double PI = fabs(atan2(0.0, -1.0));
const int MAXV = 80010;
int n;
vector<int> g[MAXV];
void load() {
  scanf("%d", &n);
  for (int i = 0, u, v; i < n - 1; i++) {
    scanf("%d%d", &u, &v);
    --u, --v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
}
int sz[MAXV];
unsigned long long pths[MAXV];
unsigned long long dp[MAXV];
unsigned long long bad = 0;
void dfs(int v, int p) {
  sz[v] = 1;
  for (int i = 0; i < (int)g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    dfs(to, v);
    sz[v] += sz[to];
  }
  pths[v] = 0;
  for (int i = 0; i < (int)g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    pths[v] += sz[to] * 1ULL * (sz[v] - sz[to] - 1);
  }
  assert(pths[v] % 2 == 0);
  pths[v] /= 2;
  pths[v] += sz[v] - 1;
  dp[v] = 0;
  for (int i = 0; i < (int)g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    dp[v] += dp[to];
  }
  bad += dp[v];
  dp[v] += pths[v] * 1ULL * sz[v];
  for (int i = 0; i < (int)g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    bad += dp[to] * 1ULL * (sz[v] - sz[to] - 1);
  }
}
void solve() {
  dfs(0, -1);
  unsigned long long res = 0;
  unsigned long long all = 0;
  for (int i = 0; i < n; i++) all += pths[i];
  for (int i = 0; i < n; i++) res += pths[i] * (all - pths[i]);
  cout << res - 2 * bad << "\n";
}
int main() {
  load();
  solve();
  return 0;
}
