#include <bits/stdc++.h>
using namespace std;
inline char gc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline unsigned long long read() {
  unsigned long long x = 0;
  char ch = getchar();
  bool positive = 1;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') positive = 0;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  return positive ? x : -x;
}
inline void write(unsigned long long a) {
  if (a < 0) {
    a = -a;
    putchar('-');
  }
  if (a >= 10) write(a / 10);
  putchar('0' + a % 10);
}
inline void writeln(unsigned long long a) {
  write(a);
  puts("");
}
inline void wri(unsigned long long a) {
  write(a);
  putchar(' ');
}
const int N = 500005, mod = 998244353;
int n;
unsigned long long f[N][2], g[N][2], tf[2], tg[2];
vector<int> v[N];
void dfs(int p, int fa) {
  f[p][0] = 1;
  for (auto i : v[p])
    if (i != fa) {
      dfs(i, p);
      swap(tf, f[p]);
      swap(tg, g[p]);
      f[p][0] = (tf[0] * f[i][1] * 2 + tf[0] * f[i][0]) % mod;
      f[p][1] = (tf[1] * (f[i][0] + f[i][1]) * 2 + tf[0] * f[i][0]) % mod;
      g[p][0] = (tg[0] * f[i][1] * 2 + tf[0] * g[i][1] * 2 + tg[0] * f[i][0] +
                 tf[0] * g[i][0]) %
                mod;
      g[p][1] =
          (tg[1] * (f[i][0] + f[i][1]) * 2 + tf[1] * (g[i][0] + g[i][1]) * 2 +
           tg[0] * f[i][0] + tf[0] * g[i][0] + tf[0] * f[i][0]) %
          mod;
    }
}
int main() {
  n = read();
  for (int i = 1; i < n; i++) {
    int s = read(), t = read();
    v[s].push_back(t);
    v[t].push_back(s);
  }
  dfs(1, 0);
  cout << ((g[1][0] + g[1][1]) * 2) % mod << 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;
inline char gc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline unsigned long long read() {
  unsigned long long x = 0;
  char ch = getchar();
  bool positive = 1;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') positive = 0;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  return positive ? x : -x;
}
inline void write(unsigned long long a) {
  if (a < 0) {
    a = -a;
    putchar('-');
  }
  if (a >= 10) write(a / 10);
  putchar('0' + a % 10);
}
inline void writeln(unsigned long long a) {
  write(a);
  puts("");
}
inline void wri(unsigned long long a) {
  write(a);
  putchar(' ');
}
const int N = 500005, mod = 998244353;
int n;
unsigned long long f[N][2], g[N][2], tf[2], tg[2];
vector<int> v[N];
void dfs(int p, int fa) {
  f[p][0] = 1;
  for (auto i : v[p])
    if (i != fa) {
      dfs(i, p);
      swap(tf, f[p]);
      swap(tg, g[p]);
      f[p][0] = (tf[0] * f[i][1] * 2 + tf[0] * f[i][0]) % mod;
      f[p][1] = (tf[1] * (f[i][0] + f[i][1]) * 2 + tf[0] * f[i][0]) % mod;
      g[p][0] = (tg[0] * f[i][1] * 2 + tf[0] * g[i][1] * 2 + tg[0] * f[i][0] +
                 tf[0] * g[i][0]) %
                mod;
      g[p][1] =
          (tg[1] * (f[i][0] + f[i][1]) * 2 + tf[1] * (g[i][0] + g[i][1]) * 2 +
           tg[0] * f[i][0] + tf[0] * g[i][0] + tf[0] * f[i][0]) %
          mod;
    }
}
int main() {
  n = read();
  for (int i = 1; i < n; i++) {
    int s = read(), t = read();
    v[s].push_back(t);
    v[t].push_back(s);
  }
  dfs(1, 0);
  cout << ((g[1][0] + g[1][1]) * 2) % mod << endl;
}

```