#include <bits/stdc++.h>
using namespace std;
const int NMax = 100000;
int N, F[NMax];
vector<int> G[NMax];
long long Ans1[NMax], Ans2[NMax], Ans3[NMax], size[NMax], ret1, ret2, ret3;
void DFS(int a, int father) {
  F[a] = 1;
  long long sum1 = 0, sum2 = 0, square = 0, square1 = 0;
  size[a] = 1;
  for (int i = 0; i < G[a].size(); i++)
    if (!F[G[a][i]]) {
      DFS(G[a][i], a);
      sum1 += size[G[a][i]];
      size[a] += size[G[a][i]];
      sum2 += size[G[a][i]] * (size[G[a][i]] - 1) / 2;
      Ans1[a] += Ans1[G[a][i]];
      square += size[G[a][i]] * size[G[a][i]];
      square1 += (size[G[a][i]] * (size[G[a][i]] - 1) / 2) *
                 (size[G[a][i]] * (size[G[a][i]] - 1) / 2);
      Ans1[a] += Ans3[G[a][i]];
    }
  long long sum3 = (sum1 * sum1 - square) / 2;
  ret3 += (sum2 * sum2 - square1) / 2;
  for (int i = 0; i < G[a].size(); i++)
    if (G[a][i] != father) {
      Ans1[a] +=
          size[G[a][i]] * (sum2 - size[G[a][i]] * (size[G[a][i]] - 1) / 2);
      Ans2[a] += size[G[a][i]] * (size[G[a][i]] - 1) / 2 *
                 (sum3 - size[G[a][i]] * (sum1 - size[G[a][i]]));
      Ans2[a] += Ans1[G[a][i]] * (sum1 - size[G[a][i]]);
      Ans2[a] += Ans3[G[a][i]] * (sum1 - size[G[a][i]]);
    }
  Ans3[a] = sum2;
  ret1 += Ans1[a];
  ret2 += Ans2[a];
}
int main() {
  scanf("%d", &N);
  for (int i = 1; i < N; i++) {
    int first, second;
    scanf("%d%d", &first, &second);
    G[first].push_back(second);
    G[second].push_back(first);
  }
  DFS(1, -1);
  printf("%lld\n", (ret1 + ret2 + ret3) * 2);
  return 0;
}
