#include <bits/stdc++.h>
using namespace std;
const long long N = 3e5 + 5;
const long long p = 998244353;
long long read() {
  long long s = 0;
  char c = getchar(), lc = '+';
  while (c < '0' || '9' < c) lc = c, c = getchar();
  while ('0' <= c && c <= '9') s = s * 10 + c - '0', c = getchar();
  return lc == '-' ? -s : s;
}
void write(long long x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x < 10)
    putchar(x + '0');
  else {
    write(x / 10);
    putchar(x % 10 + '0');
  }
}
void print(long long x, char c = '\n') {
  write(x);
  putchar(c);
}
struct edge {
  long long to, nxt;
} e[N * 2];
long long head[N], cnt = 0;
void add(long long u, long long v) {
  e[++cnt].to = v;
  e[cnt].nxt = head[u];
  head[u] = cnt;
}
long long dp[N][2][2];
void dfs(long long now, long long fa) {
  long long tmp = 1;
  dp[now][0][0] = dp[now][0][1] = dp[now][1][0] = dp[now][1][1] = 1;
  for (long long i = head[now]; i; i = e[i].nxt)
    if (e[i].to != fa) {
      long long to = e[i].to;
      dfs(to, now);
      (dp[now][0][0] *=
       (dp[to][0][0] + dp[to][0][1] + dp[to][1][0] + dp[to][1][1]) % p) %= p;
      (dp[now][0][1] *= (dp[to][0][0] + dp[to][0][1] + dp[to][1][0]) % p) %= p;
      (tmp *= (dp[to][0][0] + dp[to][0][1]) % p) %= p;
      (dp[now][1][0] *=
       (dp[to][0][0] + dp[to][0][1] + dp[to][1][0] + dp[to][1][1]) % p) %= p;
      (dp[now][1][1] *= (dp[to][0][0] + dp[to][0][1] + dp[to][1][0]) % p) %= p;
    }
  ((dp[now][0][1] -= tmp) += p) %= p;
}
int main() {
  long long n = read();
  for (long long i = 1; i < n; i++) {
    long long u = read(), v = read();
    add(u, v);
    add(v, u);
  }
  dfs(1, 0);
  print((dp[1][0][1] + dp[1][0][0] - 1 + p) % p);
  return 0;
}

### Prompt

Construct a CPP code solution to the problem outlined:

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>

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const long long N = 3e5 + 5;
const long long p = 998244353;
long long read() {
  long long s = 0;
  char c = getchar(), lc = '+';
  while (c < '0' || '9' < c) lc = c, c = getchar();
  while ('0' <= c && c <= '9') s = s * 10 + c - '0', c = getchar();
  return lc == '-' ? -s : s;
}
void write(long long x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x < 10)
    putchar(x + '0');
  else {
    write(x / 10);
    putchar(x % 10 + '0');
  }
}
void print(long long x, char c = '\n') {
  write(x);
  putchar(c);
}
struct edge {
  long long to, nxt;
} e[N * 2];
long long head[N], cnt = 0;
void add(long long u, long long v) {
  e[++cnt].to = v;
  e[cnt].nxt = head[u];
  head[u] = cnt;
}
long long dp[N][2][2];
void dfs(long long now, long long fa) {
  long long tmp = 1;
  dp[now][0][0] = dp[now][0][1] = dp[now][1][0] = dp[now][1][1] = 1;
  for (long long i = head[now]; i; i = e[i].nxt)
    if (e[i].to != fa) {
      long long to = e[i].to;
      dfs(to, now);
      (dp[now][0][0] *=
       (dp[to][0][0] + dp[to][0][1] + dp[to][1][0] + dp[to][1][1]) % p) %= p;
      (dp[now][0][1] *= (dp[to][0][0] + dp[to][0][1] + dp[to][1][0]) % p) %= p;
      (tmp *= (dp[to][0][0] + dp[to][0][1]) % p) %= p;
      (dp[now][1][0] *=
       (dp[to][0][0] + dp[to][0][1] + dp[to][1][0] + dp[to][1][1]) % p) %= p;
      (dp[now][1][1] *= (dp[to][0][0] + dp[to][0][1] + dp[to][1][0]) % p) %= p;
    }
  ((dp[now][0][1] -= tmp) += p) %= p;
}
int main() {
  long long n = read();
  for (long long i = 1; i < n; i++) {
    long long u = read(), v = read();
    add(u, v);
    add(v, u);
  }
  dfs(1, 0);
  print((dp[1][0][1] + dp[1][0][0] - 1 + p) % p);
  return 0;
}

```