#include <bits/stdc++.h>
using namespace std;
const int inf = 80009;
unsigned long long n;
vector<int> adj[inf];
unsigned long long low[inf];
unsigned long long sl[inf];
unsigned long long sz[inf];
unsigned long long als;
unsigned long long ans = 0;
void dfs(int x, int p) {
  unsigned long long s = 0;
  int k;
  unsigned long long tr = 0, fr = 0;
  for (int i = 0; i < adj[x].size(); ++i) {
    k = adj[x][i];
    if (k == p) continue;
    dfs(k, x);
    sl[x] += sl[k];
    fr += sz[k] * tr;
    tr += sz[k] * low[x];
    low[x] += sz[k] * sz[x];
    sz[x] += sz[k];
  }
  fr += (n - sz[x] - 1) * tr;
  tr += (n - sz[x] - 1) * low[x];
  ans += (fr + tr) * 6 + ((n - sz[x] - 1) * sz[x] + low[x]) * 2;
  low[x] += sz[x];
  low[x] += low[x] + 1;
  sl[x] += low[x];
  sz[x]++;
}
void solve(int x, int p) {
  ans += (als - sl[x]) * low[x];
  als -= low[x];
  unsigned long long g = low[x] / 2 + (n - sz[x]) * sz[x];
  int k;
  for (int i = 0; i < adj[x].size(); ++i) {
    k = adj[x][i];
    if (k == p) continue;
    ans += sl[k] * ((g - sz[k] * (n - sz[k])) * 2 + 1);
    solve(k, x);
  }
}
int main() {
  int a, b;
  scanf("%d", &n);
  for (int i = 0; i < n - 1; ++i) {
    scanf("%d%d", &a, &b);
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  dfs(1, 1);
  als = sl[1];
  solve(1, 1);
  unsigned long long all = (n * (n - 1)) / 2;
  all = all * all;
  printf("%I64d\n", all - ans);
}
