#include <bits/stdc++.h>
using namespace std;
const int Mod = 998244353, iv2 = (Mod + 1) >> 1;
int add(int a, int b) { return a + b >= Mod ? a + b - Mod : a + b; }
int dec(int a, int b) { return a - b < 0 ? a - b + Mod : a - b; }
int mul(int a, int b) { return 1ll * a * b % Mod; }
void Add(int &a, int b) { a = add(a, b); }
void Dec(int &a, int b) { a = dec(a, b); }
void Mul(int &a, int b) { a = mul(a, b); }
int ksm(int a, int b) {
  int ans = 1;
  for (; b; b >>= 1, Mul(a, a))
    if (b & 1) Mul(ans, a);
  return ans;
}
const int N = 5e5 + 50;
int n, ans;
vector<int> G[N];
int dp[N][2];
void dfs(int u, int f) {
  dp[u][0] = 1;
  for (int v : G[u])
    if (v != f) {
      dfs(v, u);
      int c, c0, c1;
      c0 = dp[u][0], c1 = dp[u][1];
      c = add(dp[v][0], dp[v][1]);
      Mul(c, iv2), Mul(c0, iv2);
      Mul(dp[u][0], c);
      Mul(dp[u][1], c);
      Add(dp[u][0], mul(c0, dp[v][1]));
      Add(dp[u][1], mul(c1, c));
      Add(dp[u][1], mul(c0, dp[v][0]));
      Add(ans, mul(c0, dp[v][0]));
    }
}
int main() {
  cin >> n;
  for (int i = 1, u, v; i < n; i++)
    scanf("%d%d", &u, &v), G[u].push_back(v), G[v].push_back(u);
  dfs(1, 0);
  cout << mul(ans, ksm(2, n));
  return 0;
}

### 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, iv2 = (Mod + 1) >> 1;
int add(int a, int b) { return a + b >= Mod ? a + b - Mod : a + b; }
int dec(int a, int b) { return a - b < 0 ? a - b + Mod : a - b; }
int mul(int a, int b) { return 1ll * a * b % Mod; }
void Add(int &a, int b) { a = add(a, b); }
void Dec(int &a, int b) { a = dec(a, b); }
void Mul(int &a, int b) { a = mul(a, b); }
int ksm(int a, int b) {
  int ans = 1;
  for (; b; b >>= 1, Mul(a, a))
    if (b & 1) Mul(ans, a);
  return ans;
}
const int N = 5e5 + 50;
int n, ans;
vector<int> G[N];
int dp[N][2];
void dfs(int u, int f) {
  dp[u][0] = 1;
  for (int v : G[u])
    if (v != f) {
      dfs(v, u);
      int c, c0, c1;
      c0 = dp[u][0], c1 = dp[u][1];
      c = add(dp[v][0], dp[v][1]);
      Mul(c, iv2), Mul(c0, iv2);
      Mul(dp[u][0], c);
      Mul(dp[u][1], c);
      Add(dp[u][0], mul(c0, dp[v][1]));
      Add(dp[u][1], mul(c1, c));
      Add(dp[u][1], mul(c0, dp[v][0]));
      Add(ans, mul(c0, dp[v][0]));
    }
}
int main() {
  cin >> n;
  for (int i = 1, u, v; i < n; i++)
    scanf("%d%d", &u, &v), G[u].push_back(v), G[v].push_back(u);
  dfs(1, 0);
  cout << mul(ans, ksm(2, n));
  return 0;
}

```