#include <bits/stdc++.h>
#pragma GCC optimize("O2,Ofast,inline,unroll-all-loops,-ffast-math")
using namespace std;
template <class T>
inline void in(T &x) {
  x = 0;
  char c = getchar();
  bool f = 0;
  while (!isdigit(c)) f |= (c == '-'), c = getchar();
  while (isdigit(c)) x = x * 10 + (c ^ '0'), c = getchar();
  f ? x = -x : 0;
}
template <class T>
inline void out(T x, const char c = '\n') {
  static short st[40];
  short m = 0;
  if (x < 0) putchar('-'), x = -x;
  do st[++m] = x % 10, x /= 10;
  while (x);
  while (m) putchar(st[m--] | '0');
  putchar(c);
}
template <class T>
inline void err(const T &x, const char c = '\n') {
  cerr << x << c;
}
template <class T, class... Args>
inline void in(T &x, Args &...args) {
  in(x);
  in(args...);
}
template <class T, class... Args>
inline void out(const T &x, const Args &...args) {
  out(x, ' ');
  out(args...);
}
template <class T, class... Args>
inline void err(const T &x, const Args &...args) {
  err(x, ' ');
  err(args...);
}
template <class T>
inline void prt(T a[], int n) {
  for (register int i = 0; i < n; ++i) out(a[i], i == n - 1 ? '\n' : ' ');
}
template <class T>
inline void clr(T a[], int n) {
  memset(a, 0, sizeof(T) * n);
}
template <class T>
inline void clr(T *a, T *b) {
  memset(a, 0, sizeof(T) * (b - a));
}
template <class T>
inline bool ckmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
template <class T>
inline bool ckmin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
namespace MOD_CALC {
const int md = 998244353, inv2 = (md + 1) / 2;
inline int add(const int a, const int b) {
  return a + b >= md ? a + b - md : a + b;
}
inline int sub(const int a, const int b) {
  return a - b < 0 ? a - b + md : a - b;
}
inline int mul(const int a, const int b) { return (long long)a * b % md; }
inline void inc(int &a, const int b) { (a += b) >= md ? a -= md : 0; }
inline void dec(int &a, const int b) { (a -= b) < 0 ? a += md : 0; }
inline int qpow(int a, int b) {
  int r = 1;
  for (; b; b >>= 1, a = mul(a, a))
    if (b & 1) r = mul(r, a);
  return r;
}
inline int qpow(int a, int b, const int p) {
  int r = 1;
  for (; b; b >>= 1, a = (long long)a * a % p)
    if (b & 1) r = (long long)r * a % p;
  return r;
}
inline int mdinv(const int a) { return qpow(a, md - 2); }
template <class... Args>
inline int add(const int a, const int b, const Args &...args) {
  return add(add(a, b), args...);
}
template <class... Args>
inline int mul(const int a, const int b, const Args &...args) {
  return mul(mul(a, b), args...);
}
}  // namespace MOD_CALC
using namespace MOD_CALC;
namespace i207M {
int n;
vector<int> E[500005];
int f[500005][2], g[500005][2];
void dfs(int x, int _fa) {
  g[x][0] = 1;
  for (const auto &v : E[x]) {
    if (v == _fa) continue;
    dfs(v, x);
    int nf0 = 0, nf1 = 0, ng0 = 0, ng1 = 0;
    inc(ng0, mul(g[x][0], g[v][1]));
    inc(nf0, add(mul(f[x][0], g[v][1]), mul(g[x][0], f[v][1])));
    inc(ng1, mul(g[x][0], g[v][0]));
    inc(nf1, add(mul(f[x][0], g[v][0]), mul(g[x][0], f[v][0]),
                 mul(g[x][0], g[v][0])));
    inc(ng1, mul(g[x][1], add(g[v][0], g[v][1])));
    inc(nf1, add(mul(f[x][1], add(g[v][0], g[v][1])),
                 mul(g[x][1], add(f[v][0], f[v][1]))));
    inc(ng0, mul(g[x][0], add(g[v][0], g[v][1])));
    inc(nf0, add(mul(f[x][0], add(g[v][0], g[v][1])),
                 mul(g[x][0], add(f[v][0], f[v][1]))));
    inc(ng1, mul(g[x][1], add(g[v][0], g[v][1])));
    inc(nf1, add(mul(f[x][1], add(g[v][0], g[v][1])),
                 mul(g[x][1], add(f[v][0], f[v][1]))));
    f[x][0] = nf0, f[x][1] = nf1, g[x][0] = ng0, g[x][1] = ng1;
  }
}
signed main() {
  in(n);
  for (register int i = 1, a, b; i < n; ++i) {
    in(a, b);
    E[a].emplace_back(b), E[b].emplace_back(a);
  }
  dfs(1, 0);
  int ans = add(f[1][0], f[1][1]);
  out(mul(ans, 2));
  return 0;
}
}  // namespace i207M
signed main() {
  i207M::main();
  return 0;
}

### Prompt

Please formulate a Cpp solution to the following problem:

Let's define rank of undirected graph as rank of its adjacency matrix in R^{n × n}.

Given a tree. Each edge of this tree will be deleted with probability 1/2, all these deletions are independent. Let E be the expected rank of resulting forest. Find E ⋅ 2^{n-1} modulo 998244353 (it is easy to show that E ⋅ 2^{n-1} is an integer).

Input

First line of input contains n (1 ≤ n ≤ 5 ⋅ 10^{5}) — number of vertices.

Next n-1 lines contains two integers u v (1 ≤ u,    v ≤ n;    u ≠ v) — indices of vertices connected by edge.

It is guaranteed that given graph is a tree.

Output

Print one integer — answer to the problem.

Examples

Input

3
1 2
2 3


Output

6


Input

4
1 2
1 3
1 4


Output

14


Input

4
1 2
2 3
3 4


Output

18

### Response

```cpp
#include <bits/stdc++.h>
#pragma GCC optimize("O2,Ofast,inline,unroll-all-loops,-ffast-math")
using namespace std;
template <class T>
inline void in(T &x) {
  x = 0;
  char c = getchar();
  bool f = 0;
  while (!isdigit(c)) f |= (c == '-'), c = getchar();
  while (isdigit(c)) x = x * 10 + (c ^ '0'), c = getchar();
  f ? x = -x : 0;
}
template <class T>
inline void out(T x, const char c = '\n') {
  static short st[40];
  short m = 0;
  if (x < 0) putchar('-'), x = -x;
  do st[++m] = x % 10, x /= 10;
  while (x);
  while (m) putchar(st[m--] | '0');
  putchar(c);
}
template <class T>
inline void err(const T &x, const char c = '\n') {
  cerr << x << c;
}
template <class T, class... Args>
inline void in(T &x, Args &...args) {
  in(x);
  in(args...);
}
template <class T, class... Args>
inline void out(const T &x, const Args &...args) {
  out(x, ' ');
  out(args...);
}
template <class T, class... Args>
inline void err(const T &x, const Args &...args) {
  err(x, ' ');
  err(args...);
}
template <class T>
inline void prt(T a[], int n) {
  for (register int i = 0; i < n; ++i) out(a[i], i == n - 1 ? '\n' : ' ');
}
template <class T>
inline void clr(T a[], int n) {
  memset(a, 0, sizeof(T) * n);
}
template <class T>
inline void clr(T *a, T *b) {
  memset(a, 0, sizeof(T) * (b - a));
}
template <class T>
inline bool ckmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
template <class T>
inline bool ckmin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
namespace MOD_CALC {
const int md = 998244353, inv2 = (md + 1) / 2;
inline int add(const int a, const int b) {
  return a + b >= md ? a + b - md : a + b;
}
inline int sub(const int a, const int b) {
  return a - b < 0 ? a - b + md : a - b;
}
inline int mul(const int a, const int b) { return (long long)a * b % md; }
inline void inc(int &a, const int b) { (a += b) >= md ? a -= md : 0; }
inline void dec(int &a, const int b) { (a -= b) < 0 ? a += md : 0; }
inline int qpow(int a, int b) {
  int r = 1;
  for (; b; b >>= 1, a = mul(a, a))
    if (b & 1) r = mul(r, a);
  return r;
}
inline int qpow(int a, int b, const int p) {
  int r = 1;
  for (; b; b >>= 1, a = (long long)a * a % p)
    if (b & 1) r = (long long)r * a % p;
  return r;
}
inline int mdinv(const int a) { return qpow(a, md - 2); }
template <class... Args>
inline int add(const int a, const int b, const Args &...args) {
  return add(add(a, b), args...);
}
template <class... Args>
inline int mul(const int a, const int b, const Args &...args) {
  return mul(mul(a, b), args...);
}
}  // namespace MOD_CALC
using namespace MOD_CALC;
namespace i207M {
int n;
vector<int> E[500005];
int f[500005][2], g[500005][2];
void dfs(int x, int _fa) {
  g[x][0] = 1;
  for (const auto &v : E[x]) {
    if (v == _fa) continue;
    dfs(v, x);
    int nf0 = 0, nf1 = 0, ng0 = 0, ng1 = 0;
    inc(ng0, mul(g[x][0], g[v][1]));
    inc(nf0, add(mul(f[x][0], g[v][1]), mul(g[x][0], f[v][1])));
    inc(ng1, mul(g[x][0], g[v][0]));
    inc(nf1, add(mul(f[x][0], g[v][0]), mul(g[x][0], f[v][0]),
                 mul(g[x][0], g[v][0])));
    inc(ng1, mul(g[x][1], add(g[v][0], g[v][1])));
    inc(nf1, add(mul(f[x][1], add(g[v][0], g[v][1])),
                 mul(g[x][1], add(f[v][0], f[v][1]))));
    inc(ng0, mul(g[x][0], add(g[v][0], g[v][1])));
    inc(nf0, add(mul(f[x][0], add(g[v][0], g[v][1])),
                 mul(g[x][0], add(f[v][0], f[v][1]))));
    inc(ng1, mul(g[x][1], add(g[v][0], g[v][1])));
    inc(nf1, add(mul(f[x][1], add(g[v][0], g[v][1])),
                 mul(g[x][1], add(f[v][0], f[v][1]))));
    f[x][0] = nf0, f[x][1] = nf1, g[x][0] = ng0, g[x][1] = ng1;
  }
}
signed main() {
  in(n);
  for (register int i = 1, a, b; i < n; ++i) {
    in(a, b);
    E[a].emplace_back(b), E[b].emplace_back(a);
  }
  dfs(1, 0);
  int ans = add(f[1][0], f[1][1]);
  out(mul(ans, 2));
  return 0;
}
}  // namespace i207M
signed main() {
  i207M::main();
  return 0;
}

```