Please subscribe to the official Codeforces channel in Telegram via the link: https://t.me/codeforces_official.
×

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

E. Random Forest Rank

time limit per test

3 secondsmemory limit per test

512 megabytesinput

standard inputoutput

standard outputLet's define rank of undirected graph as rank of its adjacency matrix in $$$\mathbb{R}^{n \times 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 \cdot 2^{n-1}$$$ modulo $$$998244353$$$ (it is easy to show that $$$E \cdot 2^{n-1}$$$ is an integer).

Input

First line of input contains $$$n$$$ ($$$1 \le n \le 5 \cdot 10^{5}$$$) — number of vertices.

Next $$$n-1$$$ lines contains two integers $$$u$$$ $$$v$$$ ($$$1 \le u, \,\, v \le n; \,\, u \ne 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

Codeforces (c) Copyright 2010-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Dec/16/2018 03:36:45 (d1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|