#include <bits/stdc++.h>
using namespace std;
struct timer {
  time_t start;
  timer() { start = clock(); }
  ~timer() {
    cerr << 1. * (clock() - start) / CLOCKS_PER_SEC << " secs" << endl;
  }
};
int n;
vector<int> G[80010];
long long ch[80010];
long long ch2[80010];
long long onepair[80010];
long long onepairsum[80010];
long long onepair2[80010];
long long ans[80010];
void dfs(int cur, int pre) {
  ch[cur] = 1;
  ch2[cur] = 0;
  for (int i = 0; i < (((int)G[cur].size())); i++)
    if ((G[cur][i]) != pre) {
      dfs((G[cur][i]), cur);
      ch[cur] += ch[(G[cur][i])];
      ch2[cur] += ((ch[(G[cur][i])]) * (ch[(G[cur][i])]));
    }
}
void dfs2(int cur, int pre) {
  onepair[cur] = ch[cur] - 1 + (((ch[cur] - 1) * (ch[cur] - 1)) - ch2[cur]) / 2;
  onepairsum[cur] = 0;
  onepair2[cur] = 0;
  for (int i = 0; i < (((int)G[cur].size())); i++)
    if ((G[cur][i]) != pre) {
      dfs2((G[cur][i]), cur);
      onepair[cur] += onepair[(G[cur][i])];
      onepairsum[cur] += onepair[(G[cur][i])];
      onepair2[cur] += ((onepair[(G[cur][i])]) * (onepair[(G[cur][i])]));
    }
}
long long memo[80010];
long long func(int cur, int pre) {
  long long& res = memo[cur];
  if (res != -1) return res;
  res = 0;
  for (int i = 0; i < (((int)G[cur].size())); i++)
    if ((G[cur][i]) != pre) {
      func((G[cur][i]), cur);
      res += memo[(G[cur][i])];
      res += onepair[(G[cur][i])];
      res += ch[(G[cur][i])] * (onepairsum[cur] - onepair[(G[cur][i])]);
    }
  return res;
}
void dfs3(int cur, int pre) {
  ans[cur] = (((onepairsum[cur]) * (onepairsum[cur])) - onepair2[cur]) / 2;
  for (int i = 0; i < (((int)G[cur].size())); i++)
    if ((G[cur][i]) != pre) {
      long long selectpair =
          (ch[cur] - ch[(G[cur][i])]) * (ch[cur] - ch[(G[cur][i])] - 1) / 2;
      selectpair -= onepairsum[cur] - onepair[(G[cur][i])];
      ans[cur] += onepair[(G[cur][i])] * selectpair;
      ans[cur] += (ch[cur] - ch[(G[cur][i])]) * func((G[cur][i]), cur);
      dfs3((G[cur][i]), cur);
      ans[cur] += ans[(G[cur][i])];
    }
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> n;
  int u, v;
  for (int i = 0; i < (n - 1); i++) {
    cin >> u >> v;
    u--;
    v--;
    G[v].push_back(u);
    G[u].push_back(v);
  }
  dfs(0, -1);
  dfs2(0, -1);
  fill(memo, memo + n, -1);
  dfs3(0, -1);
  cout << ans[0] * 2;
}
