#include <bits/stdc++.h>
using namespace std;
int v1, v2, licz, under[80 * 1001];
unsigned long long N, WYN, DWU[5], DP[5][80 * 1001];
bool vis[80 * 1001];
vector<int> graf[80 * 1001];
void DFS(int node) {
  vis[node] = 1;
  ++licz;
  int nad = licz;
  DP[0][node] = 1;
  for (int i = 0; i < graf[node].size(); ++i) {
    if (!vis[graf[node][i]]) {
      DFS(graf[node][i]);
      under[node] += licz - nad;
      for (int j = 4; j > 0; --j) DP[j][node] += DP[j - 1][node] * (licz - nad);
      nad = licz;
    }
  }
  for (int j = 4; j > 0; --j)
    DP[j][node] += DP[j - 1][node] * (N - 1 - under[node]);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> N;
  for (int i = 1; i < N; ++i) {
    cin >> v1 >> v2;
    graf[v1].push_back(v2);
    graf[v2].push_back(v1);
  }
  DFS(1);
  for (int i = 1; i <= N; ++i) WYN += DP[3][i] + DP[4][i];
  if (N < 100) {
    WYN = N * (N - 1) * (N - 2) * (N - 3) / 24 - WYN;
  } else {
    DWU[0] = 1;
    DWU[1] = 4;
    DWU[2] = 6;
    DWU[3] = 4;
    DWU[4] = 1;
    for (int i = 5; i <= N; ++i) {
      for (int j = 4; j > 0; --j) DWU[j] += DWU[j - 1];
    }
    WYN = DWU[4] - WYN;
  }
  cout << 2 * WYN;
  return 0;
}
