#include <bits/stdc++.h>
using namespace std;
const long long p = 998244353;
long long inv2 = (p + 1) / 2;
const long long maxn = 5e5 + 5;
vector<long long> a[maxn];
bool used[maxn];
long long dp[maxn][2];
long long po(long long a, long long b) {
  if (b == 0) return 1;
  if (b == 1) return a;
  if (b % 2 == 0) {
    long long u = po(a, b / 2);
    return (u * u) % p;
  } else {
    long long u = po(a, b - 1);
    return (a * u) % p;
  }
}
void dfs(long long x) {
  used[x] = true;
  long long r = 1;
  long long sz = 0;
  for (auto v : a[x]) {
    if (!used[v]) {
      dfs(v);
      dp[x][0] += dp[v][1];
      dp[x][0] %= p;
      ++sz;
      r *= (1 + dp[v][1] - dp[v][0]);
      r %= p;
    }
  }
  r *= po(inv2, sz);
  r %= p;
  dp[x][1] = dp[x][0] + (1 - r);
  dp[x][1] %= p;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  for (long long i = 0; i < (n - 1); ++i) {
    long long x, y;
    cin >> x >> y;
    x--;
    y--;
    a[x].push_back(y);
    a[y].push_back(x);
  }
  dfs(0);
  cout << ((dp[0][1] * po(2, n)) % p + p) % p;
  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 long long p = 998244353;
long long inv2 = (p + 1) / 2;
const long long maxn = 5e5 + 5;
vector<long long> a[maxn];
bool used[maxn];
long long dp[maxn][2];
long long po(long long a, long long b) {
  if (b == 0) return 1;
  if (b == 1) return a;
  if (b % 2 == 0) {
    long long u = po(a, b / 2);
    return (u * u) % p;
  } else {
    long long u = po(a, b - 1);
    return (a * u) % p;
  }
}
void dfs(long long x) {
  used[x] = true;
  long long r = 1;
  long long sz = 0;
  for (auto v : a[x]) {
    if (!used[v]) {
      dfs(v);
      dp[x][0] += dp[v][1];
      dp[x][0] %= p;
      ++sz;
      r *= (1 + dp[v][1] - dp[v][0]);
      r %= p;
    }
  }
  r *= po(inv2, sz);
  r %= p;
  dp[x][1] = dp[x][0] + (1 - r);
  dp[x][1] %= p;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  for (long long i = 0; i < (n - 1); ++i) {
    long long x, y;
    cin >> x >> y;
    x--;
    y--;
    a[x].push_back(y);
    a[y].push_back(x);
  }
  dfs(0);
  cout << ((dp[0][1] * po(2, n)) % p + p) % p;
  return 0;
}

```