#include <bits/stdc++.h>
using namespace std;
int N;
vector<int> graph[80010];
vector<int> child[80010];
int dp[80010];
void dfs(int p, int x) {
  dp[x] = 1;
  int i;
  for ((i) = 0; (i) < (int)(graph[x].size()); (i)++) {
    int y = graph[x][i];
    if (y != p) {
      dfs(x, y);
      dp[x] += dp[y];
      child[x].push_back(y);
    }
  }
}
long long func(int x) {
  int i;
  long long path = (long long)dp[x] * (long long)dp[x];
  for ((i) = 0; (i) < (int)(child[x].size()); (i)++) {
    int y = child[x][i];
    path -= (long long)dp[y] * (long long)dp[y];
  }
  path--;
  path /= 2;
  long long path2 = (long long)dp[x] * (long long)(N - dp[x]);
  return path * path + 2 * path * path2;
}
int main() {
  int i, a, b;
  cin >> N;
  for ((i) = 0; (i) < (int)(N - 1); (i)++) {
    scanf("%d%d", &a, &b);
    a--;
    b--;
    graph[a].push_back(b);
    graph[b].push_back(a);
  }
  dfs(-1, 0);
  long long total = (long long)N * (long long)(N - 1) / 2;
  total = total * total;
  for ((i) = 0; (i) < (int)(N); (i)++) {
    long long tmp = func(i);
    total -= tmp;
  }
  cout << total << endl;
  return 0;
}
