#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 9;
const long long N = 2e5 + 10;
string to_string(string s) { return '"' + s + '"'; }
string to_string(char s) { return string(1, s); }
string to_string(const char* s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A>
string to_string(A);
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool f = 1;
  string r = "{";
  for (const auto& x : v) {
    if (!f) r += ", ";
    f = 0;
    r += to_string(x);
  }
  return r + "}";
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
vector<long long> adj[N];
map<pair<long long, long long>, long long> mp;
long long sz[N], lev[N];
void dfs(long long u, long long p) {
  for (auto v : adj[u]) {
    if (v != p) {
      lev[v] = lev[u] + 1;
      dfs(v, u);
      sz[u] += sz[v];
    }
  }
}
long long ans = 0;
void dfs2(long long u, long long p, long long n) {
  if (p != 0) {
    ans += sz[u] * (n - sz[u]);
  }
  for (auto v : adj[u]) {
    if (v != p) {
      dfs2(v, u, n);
    }
  }
}
void solve() {
  long long n, u, v, x;
  cin >> n;
  sz[n] = 1;
  for (long long i = 1; i < n; i++) {
    sz[i] = 1;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  lev[0] = 0;
  dfs(1, 0);
  dfs2(1, 0, n);
  long long c1 = 0, c2 = 0;
  for (long long i = 1; i <= n; i++) {
    if (lev[i] & 1) {
      c1++;
    } else {
      c2++;
    }
  }
  cout << ((ans + abs(c1 * c2)) / 2) << endl;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long T = 1;
  long long t1 = 1;
  while (true) {
    solve();
    t1++;
    if (t1 > T) break;
  }
}
