#include <bits/stdc++.h>
using namespace std;
void run();
int main() {
  ios::sync_with_stdio(0);
  run();
}
set<int> edge[80000];
long long subpaths[80000];
long long beneath[80000];
long long card[80000];
long long p[80000];
long long n;
void hang(int x) {
  card[x] = 1;
  beneath[x] = 0;
  for (int y : edge[x])
    edge[y].erase(x), p[y] = x, hang(y), subpaths[x] += card[x] * card[y],
                      beneath[x] += subpaths[y], card[x] += card[y];
  beneath[x] += subpaths[x];
}
long long res = 0;
long long ayup(long long n) { return n * (n - 1) / 2; }
void rec(int x) {
  res += ayup(card[0] - card[x]) * subpaths[x];
  for (int y : edge[x]) {
    long long above = (card[0] - card[y] - 1);
    above += (card[0] - card[x]) * (card[x] - card[y] - 1);
    above -= (card[x] - card[y] - 1);
    above += (subpaths[x] - card[y] * (card[x] - card[y]));
    res += above * ayup(card[y]);
    rec(y);
  }
}
void run() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    int a, b;
    cin >> a >> b;
    --a, --b;
    edge[a].insert(b);
    edge[b].insert(a);
  }
  hang((p[0] = -1, 0));
  rec(0);
  cout << res << endl;
}
