#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n;
vector<int> g[N];
long long ans;
int dp[N];
void dfs(int v, int pr = -1) {
  dp[v] = 1;
  long long cur1 = 0;
  for (int to : g[v]) {
    if (to != pr) {
      dfs(to, v);
      cur1 += 1LL * dp[v] * dp[to];
      dp[v] += dp[to];
    }
  }
  long long cur2 = 1LL * dp[v] * (n - dp[v]);
  ans -= cur1 * cur1 + cur2 * 2 * cur1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i < n; i++) {
    int x, y;
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  ans = 1LL * n * (n - 1) / 2;
  ans *= ans;
  dfs(1);
  cout << ans;
}
