#include <bits/stdc++.h>
using namespace std;
const int N = 500005;
int cnt, u, v, n, head[N], f[N], ans;
const int mod = 998244353;
const int inv_2 = 499122177;
struct node {
  int to, next;
} num[N << 1];
int ksm(int x, int y) {
  int res = 1;
  while (y) {
    if (y & 1) res = (long long)res * x % mod;
    x = (long long)x * x % mod;
    y >>= 1;
  }
  return res;
}
void up(int &x, int y) {
  x = x - mod + y;
  x = (x < 0) ? x + mod : x;
}
void add(int x, int y) {
  num[++cnt].to = y;
  num[cnt].next = head[x];
  head[x] = cnt;
}
void dfs(int x, int fa) {
  f[x] = 1;
  for (int i = head[x]; i; i = num[i].next)
    if (num[i].to != fa) {
      dfs(num[i].to, x);
      f[x] = (long long)f[x] * (1 + f[num[i].to]) % mod * inv_2 % mod;
    }
  f[x] = ((long long)1 - f[x] + mod) % mod;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) scanf("%d%d", &u, &v), add(u, v), add(v, u);
  dfs(1, -1);
  for (int i = 1; i <= n; i++) up(ans, f[i]);
  printf("%d\n", (long long)ans * ksm(2, n) % mod);
  return 0;
}

### Prompt

Construct a cpp code solution to the problem outlined:

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;
const int N = 500005;
int cnt, u, v, n, head[N], f[N], ans;
const int mod = 998244353;
const int inv_2 = 499122177;
struct node {
  int to, next;
} num[N << 1];
int ksm(int x, int y) {
  int res = 1;
  while (y) {
    if (y & 1) res = (long long)res * x % mod;
    x = (long long)x * x % mod;
    y >>= 1;
  }
  return res;
}
void up(int &x, int y) {
  x = x - mod + y;
  x = (x < 0) ? x + mod : x;
}
void add(int x, int y) {
  num[++cnt].to = y;
  num[cnt].next = head[x];
  head[x] = cnt;
}
void dfs(int x, int fa) {
  f[x] = 1;
  for (int i = head[x]; i; i = num[i].next)
    if (num[i].to != fa) {
      dfs(num[i].to, x);
      f[x] = (long long)f[x] * (1 + f[num[i].to]) % mod * inv_2 % mod;
    }
  f[x] = ((long long)1 - f[x] + mod) % mod;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) scanf("%d%d", &u, &v), add(u, v), add(v, u);
  dfs(1, -1);
  for (int i = 1; i <= n; i++) up(ans, f[i]);
  printf("%d\n", (long long)ans * ksm(2, n) % mod);
  return 0;
}

```