#include <bits/stdc++.h>
using namespace std;
namespace SHENZHEBEI {
const int L = 2333333;
char SZB[L], *S = SZB, *T = SZB;
inline char gc() {
  if (S == T) {
    T = (S = SZB) + fread(SZB, 1, L, stdin);
    if (S == T) return '\n';
  }
  return *S++;
}
inline unsigned long long read() {
  unsigned long long x = 0;
  char ch = gc();
  for (; !isdigit(ch); ch = gc())
    ;
  for (; isdigit(ch); ch = gc()) x = x * 10 - 48 + ch;
  return x;
}
inline void write(unsigned long long x) {
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
inline char readchar() {
  char ch = gc();
  for (; isspace(ch); ch = gc())
    ;
  return ch;
}
inline unsigned long long readstr(char *s) {
  char ch = gc();
  int cur = 0;
  for (; isspace(ch); ch = gc())
    ;
  for (; !isspace(ch); ch = gc()) s[cur++] = ch;
  s[cur] = '\0';
  return cur;
}
inline void writeln(unsigned long long x) {
  write(x);
  puts("");
}
}  // namespace SHENZHEBEI
using namespace SHENZHEBEI;
const unsigned long long N = 1000010;
struct zyy {
  unsigned long long m[4][2][2];
  zyy() { memset(m, 0, sizeof m); }
} f[500010];
int head[N], nxt[N], vet[N], n, tot;
void insert(unsigned long long x, unsigned long long y) {
  nxt[++tot] = head[x];
  head[x] = tot;
  vet[tot] = y;
}
zyy merge(zyy a, zyy b) {
  zyy c;
  for (unsigned long long aj = 0; aj <= 1; ++aj)
    for (unsigned long long ak = 0; ak <= 1; ++ak)
      for (unsigned long long bj = 0; bj <= 1 - aj; ++bj)
        for (unsigned long long bk = 0; bk <= ak; ++bk) {
          c.m[0][aj + bj][ak ^ bk] += a.m[0][aj][ak] * b.m[0][bj][bk];
          c.m[1][aj + bj][ak ^ bk] += a.m[0][aj][ak] * b.m[1][bj][bk];
          c.m[1][aj + bj][ak ^ bk] += a.m[1][aj][ak] * b.m[0][bj][bk];
          c.m[2][aj + bj][ak ^ bk] += a.m[0][aj][ak] * b.m[2][bj][bk];
          c.m[2][aj + bj][ak ^ bk] += a.m[2][aj][ak] * b.m[0][bj][bk];
          c.m[3][aj + bj][ak ^ bk] += a.m[1][aj][ak] * b.m[1][bj][bk];
          c.m[3][aj + bj][ak ^ bk] += a.m[2][aj][ak] * b.m[2][bj][bk];
          c.m[3][aj + bj][ak ^ bk] += a.m[0][aj][ak] * b.m[3][bj][bk];
          c.m[3][aj + bj][ak ^ bk] += a.m[3][aj][ak] * b.m[0][bj][bk];
        }
  return c;
}
void link(zyy &x) { x.m[0][0][1] = x.m[1][0][0] = x.m[2][0][1] = 1; }
void cut(zyy &x) {
  x.m[1][1][0] += x.m[1][0][0];
  x.m[2][1][0] += x.m[2][0][0];
}
void Dfs(int x, int pre) {
  link(f[x]);
  for (unsigned long long i = head[x]; i; i = nxt[i])
    if (vet[i] ^ pre) Dfs(vet[i], x), f[x] = merge(f[x], f[vet[i]]);
  cut(f[x]);
}
int main() {
  n = read();
  for (unsigned long long i = 2; i <= n; ++i) {
    unsigned long long x = read(), y = read();
    insert(x, y);
    insert(y, x);
  }
  Dfs(1, 0);
  writeln(f[1].m[3][1][0]);
}
