#include <bits/stdc++.h>
using namespace std;
const int N = 501000;
struct Info {
  int a[2][2];
  Info(int x = 0, int y = 0, int w = 0, int z = 0) {
    a[0][0] = x;
    a[0][1] = y;
    a[1][0] = w;
    a[1][1] = z;
  }
  Info T(void) { return Info(a[1][0], a[0][0] + a[1][1], a[0][0], a[0][1]); }
  Info operator+(const Info &rhs) {
    Info c(0, 0, 0, 0);
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2; j++) {
        for (int k = 0; i + k < 2; k++) {
          for (int l = 0; j + l < 2; l++) {
            c.a[i + k][j + l] += a[i][j] * rhs.a[k][l];
          }
        }
      }
    }
    return c;
  }
} f[N], g[N];
int siz[N], n;
vector<int> adj[N];
void Down(int x, int fa) {
  siz[x] = 1;
  f[x] = Info(1, 0, 0, 0);
  if (fa) {
    adj[x].erase(find(adj[x].begin(), adj[x].end(), fa));
  }
  for (int v : adj[x]) {
    Down(v, x);
    siz[x] += siz[v];
    f[x] = f[x] + f[v].T();
  }
}
void Up(int x, int fa) {
  vector<Info> cur;
  Info suf(1, 0, 0, 0);
  if (fa) {
    cur.push_back(g[x].T());
  } else {
    cur.push_back(suf);
  }
  for (int v : adj[x]) {
    cur.push_back(cur.back() + f[v].T());
  }
  for (int i = adj[x].size() - 1; ~i; i--) {
    int v = adj[x][i];
    g[v] = cur[i] + suf;
    suf = suf + f[v].T();
    Up(v, x);
  }
}
int main(void) {
  scanf("%d", &n);
  for (int i = 1, x, y; i < n; i++) {
    scanf("%d%d", &x, &y);
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  Down(1, 0);
  Up(1, 0);
  long long ans = 0;
  for (int i = 2; i <= n; i++) {
    ans += 1LL * f[i].a[1][0] * g[i].a[1][0] * siz[i] * (n - siz[i]);
    ans += 1LL * (f[i].a[0][0] + f[i].a[1][1]) * (g[i].a[0][0] + g[i].a[1][1]);
  }
  cout << ans << endl;
  return 0;
}
