#include <bits/stdc++.h>
using namespace std;
namespace io {
const int SIZE = (1 << 21) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
                                       qu[55];
int f, qr;
inline void flush() {
  fwrite(obuf, 1, oS - obuf, stdout);
  oS = obuf;
}
inline void putc(char x) {
  *oS++ = x;
  if (oS == oT) flush();
}
template <class I>
inline void gi(I &x) {
  for (f = 1, c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                            : *iS++);
       c < '0' || c > '9';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == '-') f = -1;
  for (x = 0; c <= '9' && c >= '0';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    x = (x << 1) + (x << 3) + (c & 15);
  x *= f;
}
template <class I>
inline void get(I &x) {
  for (c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++);
       c < 'A' || c > 'Z';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    ;
  x = c;
}
inline void read(char *s) {
  for (c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++);
       c < 'A' || c > 'Z';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    ;
  for (; c >= 'A' && c <= 'Z';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    *++s = c;
  *++s = '\0';
}
template <class I>
inline void print(I x) {
  if (!x) putc('0');
  if (x < 0) putc('-'), x = -x;
  while (x) qu[++qr] = x % 10 + '0', x /= 10;
  while (qr) putc(qu[qr--]);
}
struct Flusher_ {
  ~Flusher_() { flush(); }
} io_flusher_;
}  // namespace io
using io ::get;
using io ::gi;
using io ::print;
using io ::putc;
using io ::read;
const int N = 5e5 + 5, mod = 998244353;
int f[N][2], g[N][2];
int pref[N], preg[N], suff[N], sufg[N];
vector<int> v[N];
inline void dfs(register int x, register int fa) {
  if (x != 1 && v[x].size() == 2) {
    f[x][0] = f[x][1] = 0;
    g[x][0] = 1;
    g[x][1] = 0;
    return;
  }
  register int y, i, now, nowy;
  for (i = 1; i < v[x].size(); ++i)
    if ((y = v[x][i]) != fa) dfs(y, x);
  preg[0] = 1;
  for (i = 1; i < v[x].size(); ++i) {
    preg[i] = preg[i - 1];
    if ((y = v[x][i]) != fa)
      preg[i] = preg[i - 1] * ((long long)g[y][1] + g[y][1] + g[y][0]) % mod;
  }
  sufg[v[x].size()] = 1;
  for (i = v[x].size() - 1; i; --i) {
    sufg[i] = sufg[i + 1];
    if ((y = v[x][i]) != fa)
      sufg[i] = sufg[i + 1] * ((long long)g[y][1] + g[y][1] + g[y][0]) % mod;
  }
  f[x][0] = 0;
  for (i = 1; i < v[x].size(); ++i)
    if ((y = v[x][i]) != fa)
      f[x][0] = (f[x][0] + ((long long)f[y][1] + f[y][1] + f[y][0]) *
                               preg[i - 1] % mod * sufg[i + 1]) %
                mod;
  g[x][0] = preg[v[x].size() - 1];
  pref[0] = 0;
  preg[0] = 1;
  for (i = 1; i < v[x].size(); ++i) {
    pref[i] = pref[i - 1];
    preg[i] = preg[i - 1];
    if ((y = v[x][i]) != fa)
      now = ((long long)g[y][0] + g[y][1] + g[y][1]) % mod,
      pref[i] = ((long long)pref[i] * now +
                 ((long long)f[y][0] + f[y][1] + f[y][1]) * preg[i]) %
                mod,
      preg[i] = (long long)preg[i] * now % mod;
  }
  suff[v[x].size()] = 0;
  sufg[v[x].size()] = 1;
  for (i = v[x].size() - 1; i; --i) {
    suff[i] = suff[i + 1];
    sufg[i] = sufg[i + 1];
    if ((y = v[x][i]) != fa)
      now = 2ll * (g[y][0] + g[y][1]) % mod,
      suff[i] =
          ((long long)suff[i] * now + 2ll * (f[y][0] + f[y][1]) * sufg[i]) %
          mod,
      sufg[i] = (long long)sufg[i] * now % mod;
  }
  f[x][1] = 0;
  g[x][1] = 0;
  for (i = 1; i < v[x].size(); ++i)
    if ((y = v[x][i]) != fa) {
      now = (long long)preg[i - 1] * sufg[i + 1] % mod;
      nowy = (long long)now * g[y][0] % mod;
      f[x][1] =
          (f[x][1] + (long long)pref[i - 1] * g[y][0] % mod * sufg[i + 1] +
           (long long)f[y][0] * now + nowy +
           (long long)suff[i + 1] * g[y][0] % mod * preg[i - 1]) %
          mod;
      g[x][1] = (g[x][1] + nowy) % mod;
    }
}
int main() {
  register int n, i, x, y;
  gi(n);
  for (i = 1; i <= n; ++i) v[i].push_back(-1);
  for (i = 1; i ^ n; ++i) gi(x), gi(y), v[x].push_back(y), v[y].push_back(x);
  dfs(1, 0);
  printf("%lld\n", 2ll * (f[1][0] + f[1][1]) % mod);
  return 0;
}
