#include <bits/stdc++.h>
using namespace std;
template <typename IT>
ostream &print(IT b, IT e, string sep = " ", ostream &stream = cout) {
  for (IT it = b; it != e; ++it) {
    stream << *it;
    if (it + 1 != e) stream << sep;
  }
  return stream;
}
template <typename IT>
istream &read(IT b, IT e, istream &stream = cin) {
  for (IT it = b; it != e; ++it) stream >> *it;
  return stream;
}
template <typename T>
ostream &operator<<(ostream &stream, vector<T> &t) {
  return print((t).begin(), (t).end(), " ", stream);
}
template <typename T>
ostream &operator<<(ostream &stream, vector<T> &&t) {
  return print((t).begin(), (t).end(), " ", stream);
}
template <typename T>
istream &operator>>(istream &stream, vector<T> &t) {
  return read((t).begin(), (t).end(), stream);
}
template <typename T>
void print(T x, string end = "\n") {
  cout << x << end;
}
template <typename t>
void print(vector<t> arr, string sep = " ") {
  if (arr.empty()) {
    return;
  }
  print(arr.begin(), arr.end(), sep);
  cout << '\n';
}
template <typename T>
void print(vector<vector<T> > arr) {
  for (int i = 0; i < int(arr.size()); ++i) {
    cout << "[" << arr[i] << "]";
    if (i + 1 < int(arr.size())) cout << ", ";
  }
  cout << '\n';
}
template <typename T>
T _();
const long long MOD = 1e9 + 7;
template <typename T>
vector<T> operator+(const vector<T> &lhs, const vector<T> &rhs) {
  vector<T> ans(lhs);
  assert(ans.size() == rhs.size());
  for (int i = 0; i < rhs.size(); ++i) ans[i] += rhs[i];
  return ans;
}
template <typename T>
vector<T> operator+=(vector<T> &lhs, const vector<T> &rhs) {
  return lhs = lhs + rhs;
}
template <typename T>
vector<T> operator-(const vector<T> lhs, const vector<T> rhs) {
  vector<T> ans((lhs).begin(), (lhs).end());
  assert(ans.size() == rhs.size());
  for (int i = 0; i < rhs.size(); ++i) ans[i] -= rhs[i];
  return ans;
}
template <typename T>
vector<T> operator-=(vector<T> &lhs, const vector<T> &rhs) {
  return lhs = lhs - rhs;
}
template <typename T>
vector<T> append(vector<T> &lhs, const vector<T> rhs) {
  lhs.insert(lhs.end(), (rhs).begin(), (rhs).end());
  return lhs;
}
template <typename T>
T max(const vector<T> arr) {
  assert(!arr.empty());
  T ans = arr[0];
  for (auto &cur : arr) ans = max(ans, cur);
  return ans;
}
template <typename T>
T max(const set<T> s) {
  assert(!s.empty());
  return *--s.end();
}
template <typename T, typename G>
vector<T> set_max(vector<T> &base, const vector<G> &comp) {
  assert(base.size() == comp.size());
  for (int i = 0; i < (int)comp.size(); ++i) base[i] = max(base[i], comp[i]);
  return base;
}
const int N = 2e5 + 5;
vector<int> adj[N];
long long ans;
vector<long long> dfs(int u, int p) {
  long long even = 1, odd = 0;
  long long even_sum = 0, odd_sum = 0;
  for (int v : adj[u])
    if (v != p) {
      vector<long long> tmp = dfs(v, u);
      swap(tmp[0], tmp[1]);
      swap(tmp[2], tmp[3]);
      tmp[2] += tmp[0];
      tmp[3] += tmp[1];
      ans += (even_sum * tmp[0] + even * tmp[2]) / 2;
      ans += (odd_sum * tmp[1] + odd * tmp[3]) / 2;
      ans += ((odd_sum + odd) * tmp[0] + odd * tmp[2]) / 2;
      ans += (even_sum * tmp[1] + even * (tmp[3] + tmp[1])) / 2;
      even += tmp[0];
      odd += tmp[1];
      even_sum += tmp[2];
      odd_sum += tmp[3];
    }
  return {even, odd, even_sum, odd_sum};
}
void _() {
  int n;
  cin >> n;
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  dfs(1, -1);
  print(ans);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(15);
  _();
}
