#include <bits/stdc++.h>
using namespace std;
const int N = 500010;
int n;
vector<int> bi[N];
struct V {
  long long d[4][2][2];
  V() { memset(d, 0, sizeof d); }
};
V operator*(V &a, V &b) {
  V c;
  for (int aj = 0; aj < 2; ++aj)
    for (int bj = 0; aj + bj < 2; ++bj)
      for (int ak = 0; ak < 2; ++ak)
        for (int bk = 0; bk < 2; ++bk) {
          if (ak == 0 && bk == 1) continue;
          c.d[0][aj + bj][ak ^ bk] += a.d[0][aj][ak] * b.d[0][bj][bk];
          c.d[1][aj + bj][ak ^ bk] += a.d[1][aj][ak] * b.d[0][bj][bk];
          c.d[1][aj + bj][ak ^ bk] += a.d[0][aj][ak] * b.d[1][bj][bk];
          c.d[2][aj + bj][ak ^ bk] += a.d[2][aj][ak] * b.d[0][bj][bk];
          c.d[2][aj + bj][ak ^ bk] += a.d[0][aj][ak] * b.d[2][bj][bk];
          c.d[3][aj + bj][ak ^ bk] += a.d[3][aj][ak] * b.d[0][bj][bk];
          c.d[3][aj + bj][ak ^ bk] += a.d[0][aj][ak] * b.d[3][bj][bk];
          c.d[3][aj + bj][ak ^ bk] += a.d[1][aj][ak] * b.d[1][bj][bk];
          c.d[3][aj + bj][ak ^ bk] += a.d[2][aj][ak] * b.d[2][bj][bk];
        }
  return c;
}
V init() {
  V c;
  c.d[0][0][1] = 1;
  c.d[1][0][0] = 1;
  c.d[2][0][1] = 1;
  return c;
}
V cut(V &a) {
  V c = a;
  c.d[1][1][0] += a.d[1][0][0];
  c.d[2][1][0] += a.d[2][0][0];
  return c;
}
V f[N];
void dfs(int t, int fa) {
  f[t] = init();
  for (int i = 0; i < bi[t].size(); ++i)
    if (bi[t][i] != fa) {
      dfs(bi[t][i], t);
      f[t] = f[t] * f[bi[t][i]];
    }
  f[t] = cut(f[t]);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    bi[a].push_back(b);
    bi[b].push_back(a);
  }
  dfs(1, 0);
  printf("%lld\n", f[1].d[3][1][0]);
}
