#include <bits/stdc++.h>
using namespace std;
const int MAXN = 80000;
int n;
long long twoWayCnt[MAXN], subWayCnt[MAXN], nodeCnt[MAXN], oneWayCnt[MAXN], res;
vector<int> adj[MAXN];
void DFS(int node, int parentNode) {
  nodeCnt[node] = 1;
  for (typeof((adj[node]).begin()) it = (adj[node]).begin();
       it != (adj[node]).end(); it++) {
    if (*it == parentNode) continue;
    DFS(*it, node);
    nodeCnt[node] += nodeCnt[*it];
  }
  oneWayCnt[node] = nodeCnt[node] - 1;
  long long tmpNodeCnt = nodeCnt[node] - 1;
  for (typeof((adj[node]).begin()) it = (adj[node]).begin();
       it != (adj[node]).end(); it++) {
    if (*it == parentNode) continue;
    tmpNodeCnt -= nodeCnt[*it];
    twoWayCnt[node] += nodeCnt[*it] * tmpNodeCnt;
    subWayCnt[node] += subWayCnt[*it] + oneWayCnt[*it] + twoWayCnt[*it];
  }
  long long tmpSubWayCnt = subWayCnt[node];
  for (typeof((adj[node]).begin()) it = (adj[node]).begin();
       it != (adj[node]).end(); it++) {
    if (*it == parentNode) continue;
    res += subWayCnt[*it] * (n - nodeCnt[*it]);
    res += (subWayCnt[*it] + oneWayCnt[*it] + twoWayCnt[*it]) *
           (nodeCnt[node] - 1 - nodeCnt[*it] + twoWayCnt[node] -
            nodeCnt[*it] * (nodeCnt[node] - 1 - nodeCnt[*it]) +
            (n - nodeCnt[node]) * (nodeCnt[node] - nodeCnt[*it] - 1));
    tmpSubWayCnt -= subWayCnt[*it] + oneWayCnt[*it] + twoWayCnt[*it];
    res += (subWayCnt[*it] + oneWayCnt[*it] + twoWayCnt[*it]) * tmpSubWayCnt;
  }
}
int main() {
  scanf("%d", &n);
  for (int i = (1); i < (n); i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    adj[a - 1].push_back(b - 1);
    adj[b - 1].push_back(a - 1);
  }
  DFS(0, -1);
  printf("%I64d\n", res * 2);
  return 0;
}
