#include <bits/stdc++.h>   using namespace std;   unsigned long long ans;   int n, i, j, k, u, v;   int size[80011], fa[80011];   vector<int> e[80011];   void dfs(int now) {     unsigned long long o = 0;     size[now] = 1;     for (int i = 0; i < e[now].size(); i++)       if (e[now][i] != fa[now]) {         fa[e[now][i]] = now;         dfs(e[now][i]);         o += (unsigned long long)size[now] * size[e[now][i]];         size[now] += size[e[now][i]];       }     ans -= o * (o + 2LL * size[now] * (n - size[now]));   }   int main() {     scanf( %d , &n);     for (i = 1; i < n; i++) {       scanf( %d%d , &u, &v);       e[u].push_back(v);       e[v].push_back(u);     }     ans = (n - 1LL) * n / 2;     ans *= ans;     dfs(1);     cout << ans;     return 0;   }   