#include <bits/stdc++.h>
using namespace std;
namespace ywy {
inline int get() {
  int n = 0;
  char c;
  while ((c = getchar()) || 23333) {
    if (c >= '0' && c <= '9') break;
    if (c == '-') goto s;
  }
  n = c - '0';
  while ((c = getchar()) || 23333) {
    if (c >= '0' && c <= '9')
      n = n * 10 + c - '0';
    else
      return (n);
  }
s:
  while ((c = getchar()) || 23333) {
    if (c >= '0' && c <= '9')
      n = n * 10 - c + '0';
    else
      return (n);
  }
}
typedef struct _b {
  int dest;
  int nxt;
} bian;
bian memchi[2000001];
int gn = 1, heads[500001];
long long f[500001][2], g[500001][2];
inline void add(int s, int t) {
  memchi[gn].dest = t;
  memchi[gn].nxt = heads[s];
  heads[s] = gn;
  gn++;
}
void dfs(int pt, int baba) {
  g[pt][0] = 1;
  for (register int i = heads[pt]; i; i = memchi[i].nxt) {
    if (memchi[i].dest == baba) continue;
    dfs(memchi[i].dest, pt);
    long long f0 = f[pt][0], g0 = g[pt][0], f1 = f[pt][1], g1 = g[pt][1];
    g[pt][1] = (g0 * g[memchi[i].dest][0] +
                g1 * (g[memchi[i].dest][0] + g[memchi[i].dest][1])) %
               998244353;
    g[pt][0] = (g0 * g[memchi[i].dest][1]) % 998244353;
    f[pt][1] =
        (f0 * g[memchi[i].dest][0] + g0 * g[memchi[i].dest][0]) % 998244353;
    f[pt][1] = (f[pt][1] + g0 * f[memchi[i].dest][0]) % 998244353;
    f[pt][1] = (f[pt][1] + g1 * (f[memchi[i].dest][0] + f[memchi[i].dest][1])) %
               998244353;
    f[pt][1] = (f[pt][1] + f1 * (g[memchi[i].dest][0] + g[memchi[i].dest][1])) %
               998244353;
    f[pt][0] =
        (g0 * f[memchi[i].dest][1] + f0 * g[memchi[i].dest][1]) % 998244353;
    g[pt][1] = (g[pt][1] + g1 * g[memchi[i].dest][0]) % 998244353;
    g[pt][1] = (g[pt][1] + g1 * g[memchi[i].dest][1]) % 998244353;
    g[pt][0] = (g[pt][0] + g0 * g[memchi[i].dest][0]) % 998244353;
    g[pt][0] = (g[pt][0] + g0 * g[memchi[i].dest][1]) % 998244353;
    f[pt][1] = (f[pt][1] + f1 * (g[memchi[i].dest][0] + g[memchi[i].dest][1])) %
               998244353;
    f[pt][1] = (f[pt][1] + g1 * (f[memchi[i].dest][0] + f[memchi[i].dest][1])) %
               998244353;
    f[pt][0] = (f[pt][0] + f0 * (g[memchi[i].dest][0] + g[memchi[i].dest][1])) %
               998244353;
    f[pt][0] = (f[pt][0] + g0 * (f[memchi[i].dest][0] + f[memchi[i].dest][1])) %
               998244353;
  }
}
void ywymain() {
  int n = get();
  for (register int i = 1; i < n; i++) {
    int s = get(), t = get();
    add(s, t);
    add(t, s);
  }
  dfs(1, 0);
  cout << ((f[1][0] + f[1][1]) * 2) % 998244353 << endl;
}
}  // namespace ywy
int main() {
  ywy::ywymain();
  return (0);
}

### Prompt

Develop a solution in CPP to the problem described below:

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>
using namespace std;
namespace ywy {
inline int get() {
  int n = 0;
  char c;
  while ((c = getchar()) || 23333) {
    if (c >= '0' && c <= '9') break;
    if (c == '-') goto s;
  }
  n = c - '0';
  while ((c = getchar()) || 23333) {
    if (c >= '0' && c <= '9')
      n = n * 10 + c - '0';
    else
      return (n);
  }
s:
  while ((c = getchar()) || 23333) {
    if (c >= '0' && c <= '9')
      n = n * 10 - c + '0';
    else
      return (n);
  }
}
typedef struct _b {
  int dest;
  int nxt;
} bian;
bian memchi[2000001];
int gn = 1, heads[500001];
long long f[500001][2], g[500001][2];
inline void add(int s, int t) {
  memchi[gn].dest = t;
  memchi[gn].nxt = heads[s];
  heads[s] = gn;
  gn++;
}
void dfs(int pt, int baba) {
  g[pt][0] = 1;
  for (register int i = heads[pt]; i; i = memchi[i].nxt) {
    if (memchi[i].dest == baba) continue;
    dfs(memchi[i].dest, pt);
    long long f0 = f[pt][0], g0 = g[pt][0], f1 = f[pt][1], g1 = g[pt][1];
    g[pt][1] = (g0 * g[memchi[i].dest][0] +
                g1 * (g[memchi[i].dest][0] + g[memchi[i].dest][1])) %
               998244353;
    g[pt][0] = (g0 * g[memchi[i].dest][1]) % 998244353;
    f[pt][1] =
        (f0 * g[memchi[i].dest][0] + g0 * g[memchi[i].dest][0]) % 998244353;
    f[pt][1] = (f[pt][1] + g0 * f[memchi[i].dest][0]) % 998244353;
    f[pt][1] = (f[pt][1] + g1 * (f[memchi[i].dest][0] + f[memchi[i].dest][1])) %
               998244353;
    f[pt][1] = (f[pt][1] + f1 * (g[memchi[i].dest][0] + g[memchi[i].dest][1])) %
               998244353;
    f[pt][0] =
        (g0 * f[memchi[i].dest][1] + f0 * g[memchi[i].dest][1]) % 998244353;
    g[pt][1] = (g[pt][1] + g1 * g[memchi[i].dest][0]) % 998244353;
    g[pt][1] = (g[pt][1] + g1 * g[memchi[i].dest][1]) % 998244353;
    g[pt][0] = (g[pt][0] + g0 * g[memchi[i].dest][0]) % 998244353;
    g[pt][0] = (g[pt][0] + g0 * g[memchi[i].dest][1]) % 998244353;
    f[pt][1] = (f[pt][1] + f1 * (g[memchi[i].dest][0] + g[memchi[i].dest][1])) %
               998244353;
    f[pt][1] = (f[pt][1] + g1 * (f[memchi[i].dest][0] + f[memchi[i].dest][1])) %
               998244353;
    f[pt][0] = (f[pt][0] + f0 * (g[memchi[i].dest][0] + g[memchi[i].dest][1])) %
               998244353;
    f[pt][0] = (f[pt][0] + g0 * (f[memchi[i].dest][0] + f[memchi[i].dest][1])) %
               998244353;
  }
}
void ywymain() {
  int n = get();
  for (register int i = 1; i < n; i++) {
    int s = get(), t = get();
    add(s, t);
    add(t, s);
  }
  dfs(1, 0);
  cout << ((f[1][0] + f[1][1]) * 2) % 998244353 << endl;
}
}  // namespace ywy
int main() {
  ywy::ywymain();
  return (0);
}

```