#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &t) {
  t = 0;
  char ch = getchar();
  int f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  do {
    (t *= 10) += ch - '0';
    ch = getchar();
  } while ('0' <= ch && ch <= '9');
  t *= f;
}
const long long mod = 998244353;
const int maxn = (3e5) + 10;
int n, tot, head[maxn], to[maxn * 2], nxt[maxn * 2];
long long iv[maxn], mi[maxn], dp[maxn][3], ans;
int d[maxn];
long long f[maxn][2];
void add(int x, int y) {
  tot++;
  nxt[tot] = head[x];
  head[x] = tot;
  to[tot] = y;
}
void dfs(int u, int p) {
  dp[u][0] = dp[u][1] = dp[u][2] = 1;
  long long s1 = 1, s2 = 1;
  f[u][0] = f[u][1] = 1;
  for (int i = head[u], v; i; i = nxt[i]) {
    v = to[i];
    if (v == p) continue;
    dfs(v, u);
    dp[u][0] =
        dp[u][0] * ((dp[v][0] * 2 + dp[v][1] + dp[v][2] * 2) % mod) % mod;
    s2 = s2 * (dp[v][2] + dp[v][0]) % mod;
    dp[u][2] = dp[u][2] * (dp[v][2] + dp[v][0] * 2) % mod;
    f[u][0] = f[u][0] * (f[v][1] + f[v][0]) % mod;
    f[u][1] = f[u][1] * f[v][0] % mod;
  }
  dp[u][1] = s2;
  dp[u][2] = (dp[u][2] - s2 + mod) % mod;
}
int main() {
  read(n);
  int x, y;
  for (int i = 1; i < n; i++) {
    read(x);
    read(y);
    add(x, y);
    add(y, x);
    d[x]++;
    d[y]++;
  }
  iv[0] = mi[0] = 1;
  iv[1] = mod - mod / 2;
  mi[1] = 2;
  for (int i = 2; i <= n; i++)
    mi[i] = mi[i - 1] * 2 % mod, iv[i] = iv[i - 1] * iv[1] % mod;
  dfs(1, 0);
  ans = (dp[1][0] + dp[1][2]) % mod;
  printf("%lld\n", (ans - 1 + mod) % mod);
  return 0;
}
