#include <bits/stdc++.h>
using namespace std;
using db = double;
using ll = long long;
using uint = unsigned int;
using ull = unsigned long long;
using pii = pair<int, int>;
template <class T>
void cmax(T& x, const T& y) {
  if (x < y) x = y;
}
template <class T>
void cmin(T& x, const T& y) {
  if (x > y) x = y;
}
template <class T>
void sort(vector<T>& v) {
  sort(v.begin(), v.end());
}
template <class T>
void reverse(vector<T>& v) {
  reverse(v.begin(), v.end());
}
template <class T>
void unique(vector<T>& v) {
  sort(v.begin(), v.end()), v.erase(unique(v.begin(), v.end()), v.end());
}
void reverse(string& s) { reverse(s.begin(), s.end()); }
const int io_size = 1 << 23 | 233;
const int io_limit = 1 << 22;
struct io_in {
  char ch;
  char getchar() {
    static char buf[io_size], *p1 = buf, *p2 = buf;
    return (p1 == p2) &&
                   (p2 = (p1 = buf) + fread(buf, 1, io_size, stdin), p1 == p2)
               ? EOF
               : *p1++;
  }
  io_in& operator>>(char& c) {
    for (c = getchar(); isspace(c); c = getchar())
      ;
    return *this;
  }
  io_in& operator>>(string& s) {
    for (s.clear(); isspace(ch = getchar());)
      ;
    if (!~ch) return *this;
    for (s = ch; !isspace(ch = getchar()) && ~ch; s += ch)
      ;
    return *this;
  }
  io_in& operator>>(char* str) {
    char* cur = str;
    while (*cur) *cur++ = 0;
    for (cur = str; isspace(ch = getchar());)
      ;
    if (!~ch) return *this;
    for (*cur = ch; !isspace(ch = getchar()) && ~ch; *++cur = ch)
      ;
    return *++cur = 0, *this;
  }
  template <class T>
  void read(T& x) {
    bool f = 0;
    while ((ch = getchar()) < 48 && ~ch) f ^= (ch == 45);
    x = ~ch ? (ch ^ 48) : 0;
    while ((ch = getchar()) > 47) x = x * 10 + (ch ^ 48);
    x = f ? -x : x;
  }
  io_in& operator>>(int& x) { return read(x), *this; }
  io_in& operator>>(ll& x) { return read(x), *this; }
  io_in& operator>>(uint& x) { return read(x), *this; }
  io_in& operator>>(ull& x) { return read(x), *this; }
  io_in& operator>>(db& x) {
    read(x);
    bool f = x < 0;
    x = f ? -x : x;
    if (ch ^ '.') return *this;
    double d = 0.1;
    while ((ch = getchar()) > 47) x += d * (ch ^ 48), d *= .1;
    return x = f ? -x : x, *this;
  }
} in;
struct io_out {
  char buf[io_size], *s = buf;
  int pw[233], st[233];
  io_out() {
    set(7);
    for (register int i = (pw[0] = 1); i <= (9); ++i) pw[i] = pw[i - 1] * 10;
  }
  ~io_out() { flush(); }
  void io_chk() {
    if (s - buf > io_limit) flush();
  }
  void flush() { fwrite(buf, 1, s - buf, stdout), fflush(stdout), s = buf; }
  io_out& operator<<(char c) { return *s++ = c, *this; }
  io_out& operator<<(string str) {
    for (char c : str) *s++ = c;
    return io_chk(), *this;
  }
  io_out& operator<<(char* str) {
    char* cur = str;
    while (*cur) *s++ = *cur++;
    return io_chk(), *this;
  }
  template <class T>
  void write(T x) {
    if (x < 0) *s++ = '-', x = -x;
    do {
      st[++st[0]] = x % 10, x /= 10;
    } while (x);
    while (st[0]) *s++ = st[st[0]--] ^ 48;
  }
  io_out& operator<<(int x) { return write(x), io_chk(), *this; }
  io_out& operator<<(ll x) { return write(x), io_chk(), *this; }
  io_out& operator<<(uint x) { return write(x), io_chk(), *this; }
  io_out& operator<<(ull x) { return write(x), io_chk(), *this; }
  int len, lft, rig;
  void set(int _length) { len = _length; }
  io_out& operator<<(db x) {
    bool f = x < 0;
    x = f ? -x : x, lft = x, rig = 1. * (x - lft) * pw[len];
    return write(f ? -lft : lft), *s++ = '.', write(rig), io_chk(), *this;
  }
} out;
template <long long sz, long long mod>
struct math_t {
  math_t() {
    fac.resize(sz + 1), ifac.resize(sz + 1);
    for (register long long i = (fac[0] = 1); i <= (sz); ++i)
      fac[i] = fac[i - 1] * i % mod;
    ifac[sz] = inv(fac[sz]);
    for (register long long i = (sz - 1); i >= (0); --i)
      ifac[i] = ifac[i + 1] * (i + 1) % mod;
  }
  vector<long long> fac, ifac;
  long long qpow(long long x, long long y) {
    long long ans = 1;
    for (; y; y >>= 1, x = x * x % mod)
      if (y & 1) ans = ans * x % mod;
    return ans;
  }
  long long inv(long long x) { return qpow(x, mod - 2); }
  long long C(long long n, long long m) {
    if (n < 0 || m < 0 || n < m) return 0;
    return fac[n] * ifac[m] % mod * ifac[n - m] % mod;
  }
};
long long gcd(long long x, long long y) { return !y ? x : gcd(y, x % y); }
long long lcm(long long x, long long y) { return x * y / gcd(x, y); }
const long long mod = 998244353;
long long n;
const long long maxn = 3e5 + 53;
vector<long long> g[maxn];
long long inc(long long x, long long y) {
  if (x + y >= mod)
    return (x + y - mod);
  else
    return (x + y);
}
long long del(long long x, long long y) {
  if (x - y < 0)
    return (x - y + mod);
  else
    return (x - y);
}
long long ans = 0;
long long fa[maxn];
long long dp1[maxn];
long long dp[maxn];
long long dp2[maxn];
long long mul(long long x, long long y) {
  if (x * y < mod) return x * y;
  return x * y % mod;
}
void dfs(long long u) {
  dp2[u] = 1;
  for (long long v : g[u]) {
    if (v == fa[u]) continue;
    fa[v] = u;
    dfs(v);
    dp1[u] =
        inc(mul(dp1[u], inc(dp1[v], inc(dp[v], dp2[v]))),
            mul(inc(dp1[u], dp2[u]), inc(dp1[v], inc(dp[v], dp2[v] << 1))));
    dp[u] = inc(mul(dp[u], inc(dp1[v], inc(dp[v], dp2[v]))),
                mul(inc(dp[u], dp2[u]), inc(dp1[v], dp2[v])));
    dp2[u] = mul(dp2[u], inc(dp1[v], inc(dp[v], dp2[v])));
  }
}
signed main() {
  in >> n;
  for (register long long i = (2); i <= (n); ++i) {
    long long u, v;
    in >> u >> v;
    g[u].emplace_back(v);
    g[v].emplace_back(u);
  }
  dfs(1);
  ans = inc(ans, dp[1]);
  ans = inc(ans, dp1[1]);
  ans = inc(ans, dp2[1]);
  out << del(ans, 1) << '\n';
  return 0;
}

### Prompt

Please formulate a CPP solution to the following problem:

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;
using db = double;
using ll = long long;
using uint = unsigned int;
using ull = unsigned long long;
using pii = pair<int, int>;
template <class T>
void cmax(T& x, const T& y) {
  if (x < y) x = y;
}
template <class T>
void cmin(T& x, const T& y) {
  if (x > y) x = y;
}
template <class T>
void sort(vector<T>& v) {
  sort(v.begin(), v.end());
}
template <class T>
void reverse(vector<T>& v) {
  reverse(v.begin(), v.end());
}
template <class T>
void unique(vector<T>& v) {
  sort(v.begin(), v.end()), v.erase(unique(v.begin(), v.end()), v.end());
}
void reverse(string& s) { reverse(s.begin(), s.end()); }
const int io_size = 1 << 23 | 233;
const int io_limit = 1 << 22;
struct io_in {
  char ch;
  char getchar() {
    static char buf[io_size], *p1 = buf, *p2 = buf;
    return (p1 == p2) &&
                   (p2 = (p1 = buf) + fread(buf, 1, io_size, stdin), p1 == p2)
               ? EOF
               : *p1++;
  }
  io_in& operator>>(char& c) {
    for (c = getchar(); isspace(c); c = getchar())
      ;
    return *this;
  }
  io_in& operator>>(string& s) {
    for (s.clear(); isspace(ch = getchar());)
      ;
    if (!~ch) return *this;
    for (s = ch; !isspace(ch = getchar()) && ~ch; s += ch)
      ;
    return *this;
  }
  io_in& operator>>(char* str) {
    char* cur = str;
    while (*cur) *cur++ = 0;
    for (cur = str; isspace(ch = getchar());)
      ;
    if (!~ch) return *this;
    for (*cur = ch; !isspace(ch = getchar()) && ~ch; *++cur = ch)
      ;
    return *++cur = 0, *this;
  }
  template <class T>
  void read(T& x) {
    bool f = 0;
    while ((ch = getchar()) < 48 && ~ch) f ^= (ch == 45);
    x = ~ch ? (ch ^ 48) : 0;
    while ((ch = getchar()) > 47) x = x * 10 + (ch ^ 48);
    x = f ? -x : x;
  }
  io_in& operator>>(int& x) { return read(x), *this; }
  io_in& operator>>(ll& x) { return read(x), *this; }
  io_in& operator>>(uint& x) { return read(x), *this; }
  io_in& operator>>(ull& x) { return read(x), *this; }
  io_in& operator>>(db& x) {
    read(x);
    bool f = x < 0;
    x = f ? -x : x;
    if (ch ^ '.') return *this;
    double d = 0.1;
    while ((ch = getchar()) > 47) x += d * (ch ^ 48), d *= .1;
    return x = f ? -x : x, *this;
  }
} in;
struct io_out {
  char buf[io_size], *s = buf;
  int pw[233], st[233];
  io_out() {
    set(7);
    for (register int i = (pw[0] = 1); i <= (9); ++i) pw[i] = pw[i - 1] * 10;
  }
  ~io_out() { flush(); }
  void io_chk() {
    if (s - buf > io_limit) flush();
  }
  void flush() { fwrite(buf, 1, s - buf, stdout), fflush(stdout), s = buf; }
  io_out& operator<<(char c) { return *s++ = c, *this; }
  io_out& operator<<(string str) {
    for (char c : str) *s++ = c;
    return io_chk(), *this;
  }
  io_out& operator<<(char* str) {
    char* cur = str;
    while (*cur) *s++ = *cur++;
    return io_chk(), *this;
  }
  template <class T>
  void write(T x) {
    if (x < 0) *s++ = '-', x = -x;
    do {
      st[++st[0]] = x % 10, x /= 10;
    } while (x);
    while (st[0]) *s++ = st[st[0]--] ^ 48;
  }
  io_out& operator<<(int x) { return write(x), io_chk(), *this; }
  io_out& operator<<(ll x) { return write(x), io_chk(), *this; }
  io_out& operator<<(uint x) { return write(x), io_chk(), *this; }
  io_out& operator<<(ull x) { return write(x), io_chk(), *this; }
  int len, lft, rig;
  void set(int _length) { len = _length; }
  io_out& operator<<(db x) {
    bool f = x < 0;
    x = f ? -x : x, lft = x, rig = 1. * (x - lft) * pw[len];
    return write(f ? -lft : lft), *s++ = '.', write(rig), io_chk(), *this;
  }
} out;
template <long long sz, long long mod>
struct math_t {
  math_t() {
    fac.resize(sz + 1), ifac.resize(sz + 1);
    for (register long long i = (fac[0] = 1); i <= (sz); ++i)
      fac[i] = fac[i - 1] * i % mod;
    ifac[sz] = inv(fac[sz]);
    for (register long long i = (sz - 1); i >= (0); --i)
      ifac[i] = ifac[i + 1] * (i + 1) % mod;
  }
  vector<long long> fac, ifac;
  long long qpow(long long x, long long y) {
    long long ans = 1;
    for (; y; y >>= 1, x = x * x % mod)
      if (y & 1) ans = ans * x % mod;
    return ans;
  }
  long long inv(long long x) { return qpow(x, mod - 2); }
  long long C(long long n, long long m) {
    if (n < 0 || m < 0 || n < m) return 0;
    return fac[n] * ifac[m] % mod * ifac[n - m] % mod;
  }
};
long long gcd(long long x, long long y) { return !y ? x : gcd(y, x % y); }
long long lcm(long long x, long long y) { return x * y / gcd(x, y); }
const long long mod = 998244353;
long long n;
const long long maxn = 3e5 + 53;
vector<long long> g[maxn];
long long inc(long long x, long long y) {
  if (x + y >= mod)
    return (x + y - mod);
  else
    return (x + y);
}
long long del(long long x, long long y) {
  if (x - y < 0)
    return (x - y + mod);
  else
    return (x - y);
}
long long ans = 0;
long long fa[maxn];
long long dp1[maxn];
long long dp[maxn];
long long dp2[maxn];
long long mul(long long x, long long y) {
  if (x * y < mod) return x * y;
  return x * y % mod;
}
void dfs(long long u) {
  dp2[u] = 1;
  for (long long v : g[u]) {
    if (v == fa[u]) continue;
    fa[v] = u;
    dfs(v);
    dp1[u] =
        inc(mul(dp1[u], inc(dp1[v], inc(dp[v], dp2[v]))),
            mul(inc(dp1[u], dp2[u]), inc(dp1[v], inc(dp[v], dp2[v] << 1))));
    dp[u] = inc(mul(dp[u], inc(dp1[v], inc(dp[v], dp2[v]))),
                mul(inc(dp[u], dp2[u]), inc(dp1[v], dp2[v])));
    dp2[u] = mul(dp2[u], inc(dp1[v], inc(dp[v], dp2[v])));
  }
}
signed main() {
  in >> n;
  for (register long long i = (2); i <= (n); ++i) {
    long long u, v;
    in >> u >> v;
    g[u].emplace_back(v);
    g[v].emplace_back(u);
  }
  dfs(1);
  ans = inc(ans, dp[1]);
  ans = inc(ans, dp1[1]);
  ans = inc(ans, dp2[1]);
  out << del(ans, 1) << '\n';
  return 0;
}

```