#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const long long UNDEF = -1;
const long long INF = 1e18;
template <typename T>
inline bool chkmax(T &aa, T bb) {
  return aa < bb ? aa = bb, true : false;
}
template <typename T>
inline bool chkmin(T &aa, T bb) {
  return aa > bb ? aa = bb, true : false;
}
static char stdinBuffer[1024];
static char *stdinDataEnd = stdinBuffer + sizeof(stdinBuffer);
static const char *stdinPos = stdinDataEnd;
void readAhead(size_t amount) {
  size_t remaining = stdinDataEnd - stdinPos;
  if (remaining < amount) {
    memmove(stdinBuffer, stdinPos, remaining);
    size_t sz = fread(stdinBuffer + remaining, 1,
                      sizeof(stdinBuffer) - remaining, stdin);
    stdinPos = stdinBuffer;
    stdinDataEnd = stdinBuffer + remaining + sz;
    if (stdinDataEnd != stdinBuffer + sizeof(stdinBuffer)) *stdinDataEnd = 0;
  }
}
int rint() {
  readAhead(16);
  int x = 0;
  bool neg = false;
  while (*stdinPos == ' ' || *stdinPos == '\n') ++stdinPos;
  if (*stdinPos == '-') {
    ++stdinPos;
    neg = true;
  }
  while (*stdinPos >= '0' && *stdinPos <= '9') {
    x *= 10;
    x += *stdinPos - '0';
    ++stdinPos;
  }
  return neg ? -x : x;
}
char rch() {
  readAhead(16);
  while (*stdinPos == ' ' || *stdinPos == '\n') ++stdinPos;
  char ans = *stdinPos;
  ++stdinPos;
  return ans;
}
long long rlong() {
  readAhead(32);
  long long x = 0;
  bool neg = false;
  while (*stdinPos == ' ' || *stdinPos == '\n') ++stdinPos;
  if (*stdinPos == '-') {
    ++stdinPos;
    neg = true;
  }
  while (*stdinPos >= '0' && *stdinPos <= '9') {
    x *= 10;
    x += *stdinPos - '0';
    ++stdinPos;
  }
  return neg ? -x : x;
}
const int mn = 8e4 + 4;
vector<int> g[mn];
int sz[mn];
int getsz(int x, int p) {
  int ans = 1;
  for (auto &y : g[x]) {
    if (y == p) continue;
    ans += getsz(y, x);
  }
  return sz[x] = ans;
}
long long final = 0;
void go(int x, int p) {
  for (auto &y : g[x]) {
    if (y == p) continue;
    go(y, x);
  }
  int cum = 0;
  long long ab = 0;
  for (auto &y : g[x]) {
    if (y == p) continue;
    int a = cum;
    int b = sz[y];
    long long tab = a * (long long)b;
    ab += tab;
    cum += sz[y];
  }
  int c = cum;
  int d = sz[1] - sz[x];
  long long cd = c * (long long)d;
  int down = cum;
  int up = sz[1] - sz[x];
  long long ans = 0;
  ans += 1ll * ab * ab;
  ans += 2ll * ab * cd;
  ans += 2ll * ab * down;
  ans += 2ll * ab * up;
  ans += 2ll * down * cd;
  ans += 2ll * down * up;
  ans += 1ll * down * down;
  final += ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n = rint();
  for (int i = 1; i < n; i++) {
    int x = rint(), y = rint();
    g[x].push_back(y);
    g[y].push_back(x);
  }
  getsz(1, -1);
  go(1, -1);
  long long all = (1ll * n * (n - 1)) / 2;
  all = all * all;
  long long lft = all - final;
  printf("%lld\n", lft);
}
