#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
const int N = 5000 * 100 + 10;
vector<int> adj[N];
int t2[N], sz[N], dp[N][2];
int ans = 0, n;
void dfs_sz(int u, int p) {
  sz[u] = 1;
  for (auto v : adj[u])
    if (v != p) dfs_sz(v, u), sz[u] += sz[v];
}
void dfs(int u, int p) {
  dp[u][1] = 1;
  int sum = 0;
  for (auto v : adj[u]) {
    if (v == p) continue;
    dfs(v, u);
    sum += sz[v];
    dp[u][0] += 1ll * dp[v][1] * dp[u][1] % mod * t2[sz[u] - sum - 1] % mod;
    if (dp[u][0] > mod) dp[u][0] -= mod;
    dp[u][1] = 1ll * dp[u][1] * (dp[v][0] + t2[sz[v] - 1]) % mod;
  }
  ans += 2ll * dp[u][0] * t2[n - sz[u]] % mod;
  if (ans > mod) ans -= mod;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  t2[0] = 1;
  for (int i = 1; i < N; i++) t2[i] = t2[i - 1] * 2 % mod;
  for (int i = 1; i < n; i++) {
    int x, y;
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  dfs_sz(1, -1);
  dfs(1, -1);
  cout << ans << endl;
}

### Prompt

In CPP, your task is to solve 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>
using namespace std;
const int mod = 998244353;
const int N = 5000 * 100 + 10;
vector<int> adj[N];
int t2[N], sz[N], dp[N][2];
int ans = 0, n;
void dfs_sz(int u, int p) {
  sz[u] = 1;
  for (auto v : adj[u])
    if (v != p) dfs_sz(v, u), sz[u] += sz[v];
}
void dfs(int u, int p) {
  dp[u][1] = 1;
  int sum = 0;
  for (auto v : adj[u]) {
    if (v == p) continue;
    dfs(v, u);
    sum += sz[v];
    dp[u][0] += 1ll * dp[v][1] * dp[u][1] % mod * t2[sz[u] - sum - 1] % mod;
    if (dp[u][0] > mod) dp[u][0] -= mod;
    dp[u][1] = 1ll * dp[u][1] * (dp[v][0] + t2[sz[v] - 1]) % mod;
  }
  ans += 2ll * dp[u][0] * t2[n - sz[u]] % mod;
  if (ans > mod) ans -= mod;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  t2[0] = 1;
  for (int i = 1; i < N; i++) t2[i] = t2[i - 1] * 2 % mod;
  for (int i = 1; i < n; i++) {
    int x, y;
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  dfs_sz(1, -1);
  dfs(1, -1);
  cout << ans << endl;
}

```