#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5e5 + 5, MOD = 998244353, i2 = (MOD + 1) / 2;
inline int add(int x, int y) { return x + y < MOD ? x + y : x + y - MOD; }
inline int dec(int x, int y) { return x < y ? x - y + MOD : x - y; }
inline void ADD(int& x, int y) {
  x += y;
  if (x >= MOD) x -= MOD;
}
inline void DEC(int& x, int y) {
  x -= y;
  if (x < 0) x += MOD;
}
long long q_pow(long long a, long long b, long long p = MOD) {
  long long ret = 1;
  for (; b; a = a * a % p, b >>= 1)
    if (b & 1) ret = ret * a % p;
  return ret;
}
long long q_inv(long long x, long long p = MOD) { return q_pow(x, p - 2, p); }
int N;
struct node {
  int v, next;
} E[MAXN << 1];
int head[MAXN], Elen;
void addedge(int u, int v) {
  ++Elen, E[Elen].v = v, E[Elen].next = head[u], head[u] = Elen;
}
struct poly {
  int a, b;
  poly(int a = 0, int b = 0) : a(a), b(b) {}
  friend poly operator+(const poly& l, const poly& r) {
    return poly(add(l.a, r.a), add(l.b, r.b));
  }
  friend poly operator-(const poly& l, const poly& r) {
    return poly(dec(l.a, r.a), dec(l.b, r.b));
  }
  friend poly operator*(const poly& l, const poly& r) {
    return poly(1ll * l.a * r.a % MOD,
                add(1ll * l.a * r.b % MOD, 1ll * l.b * r.a % MOD));
  }
};
int f[MAXN][2], p[MAXN][2];
void dfs(int u, int ff) {
  poly f0(1, 0), f1(1, 0);
  p[u][1] = 1;
  for (int i = head[u]; i; i = E[i].next)
    if (E[i].v != ff) {
      dfs(E[i].v, u);
      p[u][1] = 1ll * p[u][1] * add(i2, 1ll * i2 * p[E[i].v][0] % MOD) % MOD;
    }
  p[u][0] = dec(1, p[u][1]);
  int qwq = 1, tmp = 1;
  for (int i = head[u]; i; i = E[i].next)
    if (E[i].v != ff) {
      poly tt = (poly(1, add(f[E[i].v][0], f[E[i].v][1])) +
                 poly(p[E[i].v][0], f[E[i].v][0]));
      f1 = f1 * (poly(1, add(f[E[i].v][0], f[E[i].v][1])) +
                 poly(p[E[i].v][0], f[E[i].v][0]));
      f0 = f0 * (poly(1, add(f[E[i].v][0], f[E[i].v][1])) +
                 poly(p[E[i].v][0], f[E[i].v][0]) +
                 poly(p[E[i].v][1], f[E[i].v][1]));
      qwq = 1ll * qwq * i2 % MOD;
      tmp = 1ll * tmp * add(1, p[E[i].v][0]) % MOD;
    }
  f0 = f0 - f1, f[u][0] = 1ll * f0.b * qwq % MOD;
  ADD(f[u][0], 1), tmp = 1ll * tmp * qwq % MOD, DEC(f[u][0], tmp);
  f[u][1] = 1ll * f1.b * qwq % MOD;
}
int main() {
  scanf("%d", &N);
  int u, v;
  for (int i = 1; i < N; ++i)
    scanf("%d%d", &u, &v), addedge(u, v), addedge(v, u);
  dfs(1, 0);
  int ans = add(f[1][0], f[1][1]);
  for (int i = 1; i < N; ++i) ans = ans * 2 % MOD;
  ans = ans * 2 % MOD;
  printf("%d", ans);
  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 MAXN = 5e5 + 5, MOD = 998244353, i2 = (MOD + 1) / 2;
inline int add(int x, int y) { return x + y < MOD ? x + y : x + y - MOD; }
inline int dec(int x, int y) { return x < y ? x - y + MOD : x - y; }
inline void ADD(int& x, int y) {
  x += y;
  if (x >= MOD) x -= MOD;
}
inline void DEC(int& x, int y) {
  x -= y;
  if (x < 0) x += MOD;
}
long long q_pow(long long a, long long b, long long p = MOD) {
  long long ret = 1;
  for (; b; a = a * a % p, b >>= 1)
    if (b & 1) ret = ret * a % p;
  return ret;
}
long long q_inv(long long x, long long p = MOD) { return q_pow(x, p - 2, p); }
int N;
struct node {
  int v, next;
} E[MAXN << 1];
int head[MAXN], Elen;
void addedge(int u, int v) {
  ++Elen, E[Elen].v = v, E[Elen].next = head[u], head[u] = Elen;
}
struct poly {
  int a, b;
  poly(int a = 0, int b = 0) : a(a), b(b) {}
  friend poly operator+(const poly& l, const poly& r) {
    return poly(add(l.a, r.a), add(l.b, r.b));
  }
  friend poly operator-(const poly& l, const poly& r) {
    return poly(dec(l.a, r.a), dec(l.b, r.b));
  }
  friend poly operator*(const poly& l, const poly& r) {
    return poly(1ll * l.a * r.a % MOD,
                add(1ll * l.a * r.b % MOD, 1ll * l.b * r.a % MOD));
  }
};
int f[MAXN][2], p[MAXN][2];
void dfs(int u, int ff) {
  poly f0(1, 0), f1(1, 0);
  p[u][1] = 1;
  for (int i = head[u]; i; i = E[i].next)
    if (E[i].v != ff) {
      dfs(E[i].v, u);
      p[u][1] = 1ll * p[u][1] * add(i2, 1ll * i2 * p[E[i].v][0] % MOD) % MOD;
    }
  p[u][0] = dec(1, p[u][1]);
  int qwq = 1, tmp = 1;
  for (int i = head[u]; i; i = E[i].next)
    if (E[i].v != ff) {
      poly tt = (poly(1, add(f[E[i].v][0], f[E[i].v][1])) +
                 poly(p[E[i].v][0], f[E[i].v][0]));
      f1 = f1 * (poly(1, add(f[E[i].v][0], f[E[i].v][1])) +
                 poly(p[E[i].v][0], f[E[i].v][0]));
      f0 = f0 * (poly(1, add(f[E[i].v][0], f[E[i].v][1])) +
                 poly(p[E[i].v][0], f[E[i].v][0]) +
                 poly(p[E[i].v][1], f[E[i].v][1]));
      qwq = 1ll * qwq * i2 % MOD;
      tmp = 1ll * tmp * add(1, p[E[i].v][0]) % MOD;
    }
  f0 = f0 - f1, f[u][0] = 1ll * f0.b * qwq % MOD;
  ADD(f[u][0], 1), tmp = 1ll * tmp * qwq % MOD, DEC(f[u][0], tmp);
  f[u][1] = 1ll * f1.b * qwq % MOD;
}
int main() {
  scanf("%d", &N);
  int u, v;
  for (int i = 1; i < N; ++i)
    scanf("%d%d", &u, &v), addedge(u, v), addedge(v, u);
  dfs(1, 0);
  int ans = add(f[1][0], f[1][1]);
  for (int i = 1; i < N; ++i) ans = ans * 2 % MOD;
  ans = ans * 2 % MOD;
  printf("%d", ans);
  return 0;
}

```