#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:64000000")
int n;
vector<vector<int> > g;
int st[1 << 17];
long long res;
inline void init() {
  int x, y;
  scanf("%d", &n);
  g.resize(n);
  for (int i = 1; i < n; ++i) {
    scanf("%d%d", &x, &y);
    --x, --y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  long long M = ((long long)n * (long long)(n - 1)) / 2;
  res = M * (M - 1);
  res >>= 1;
}
int subtree(int x, int p) {
  if (st[x] != -1) return st[x];
  int K = (int)g[x].size();
  int res = 1;
  for (int i = 0; i < K; ++i) {
    int y = g[x][i];
    if (y == p) continue;
    res += subtree(y, x);
  }
  return st[x] = res;
}
void dfs(int x, int p, int up) {
  int K = (int)g[x].size();
  int full = up + subtree(x, p);
  long long good = 0;
  long long bad = up;
  long long cur = 1;
  for (int i = 0; i < K; ++i) {
    int y = g[x][i];
    if (y == p) continue;
    bad += (long long)subtree(y, x) * up;
    good += cur * (long long)subtree(y, x);
    cur += (long long)subtree(y, x);
    dfs(y, x, full - subtree(y, x));
  }
  res -= bad * good;
  res -= (good * (good - 1)) / 2;
}
int main() {
  init();
  memset(st, -1, sizeof st);
  dfs(0, 0, 0);
  res *= 2;
  cout << res << endl;
  return 0;
}
