Eric is the teacher of graph theory class. Today, Eric teaches independent set and edge-induced subgraph.

Given a graph G=(V,E), an independent set is a subset of vertices V' ⊂ V such that for every pair u,v ∈ V', (u,v) not ∈ E (i.e. no edge in E connects two vertices from V').

An edge-induced subgraph consists of a subset of edges E' ⊂ E and all the vertices in the original graph that are incident on at least one edge in the subgraph.

Given E' ⊂ E, denote G[E'] the edge-induced subgraph such that E' is the edge set of the subgraph. Here is an illustration of those definitions:

<image>

In order to help his students get familiar with those definitions, he leaves the following problem as an exercise:

Given a tree G=(V,E), calculate the sum of w(H) over all except null edge-induced subgraph H of G, where w(H) is the number of independent sets in H. Formally, calculate ∑ _{∅ not= E' ⊂ E} w(G[E']).

Show Eric that you are smarter than his students by providing the correct answer as quickly as possible. Note that the answer might be large, you should output the answer modulo 998,244,353.

Input

The first line contains a single integer n (2 ≤ n ≤ 3 ⋅ 10^5), representing the number of vertices of the graph G.

Each of the following n-1 lines contains two integers u and v (1 ≤ u,v ≤ n, u not= v), describing edges of the given tree.

It is guaranteed that the given edges form a tree.

Output

Output one integer, representing the desired value modulo 998,244,353.

Examples

Input


2
2 1


Output


3


Input


3
1 2
3 2


Output


11

Note

For the second example, all independent sets are listed below.

<image>
#include <bits/stdc++.h>
using namespace std;
const long long MOD = (119 << 23) + 1;
long long add(long long a, long long b) {
  a += b;
  if (a < 0) {
    a += MOD;
  }
  if (a >= MOD) {
    a -= MOD;
  }
  return a;
}
long long sub(long long a, long long b) {
  a -= b;
  if (a < 0) a += MOD;
  return a;
}
long long mult(long long a, long long b) { return (a * b) % MOD; }
const long long mxN = 300000;
vector<long long> adj[mxN];
long long dp[mxN][3];
void dfs(long long v, long long p) {
  dp[v][0] = dp[v][1] = dp[v][2] = 1;
  for (long long i : adj[v]) {
    if (i == p) continue;
    dfs(i, v);
    dp[v][0] = mult(dp[v][0], add(add(dp[i][0], dp[i][1]), dp[i][2]));
    dp[v][1] = mult(dp[v][1], add(add(mult(3, dp[i][0]), mult(2, dp[i][1])),
                                  mult(2, dp[i][2])));
    dp[v][2] = mult(dp[v][2],
                    add(add(mult(2, dp[i][0]), mult(2, dp[i][1])), dp[i][2]));
  }
  dp[v][1] = sub(dp[v][1], dp[v][0]);
  dp[v][2] = sub(dp[v][2], dp[v][0]);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  for (long long i = 0; i < n - 1; ++i) {
    long long a, b;
    cin >> a >> b;
    --a;
    --b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  dfs(0, -1);
  cout << add(add(dp[0][0], dp[0][1]), sub(dp[0][2], 1)) << "\n";
}
