#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void rd(T &x) {
  char ch;
  x = 0;
  bool fl = false;
  while (!isdigit(ch = getchar())) (ch == '-') && (fl = true);
  for (x = (ch ^ '0'); isdigit(ch = getchar()); x = x * 10 + (ch ^ '0'))
    ;
  (fl == true) && (x = -x);
}
template <class T>
inline void output(T x) {
  if (x / 10) output(x / 10);
  putchar(x % 10 + '0');
}
template <class T>
inline void ot(T x) {
  if (x < 0) putchar('-'), x = -x;
  output(x);
  putchar(' ');
}
template <class T>
inline void prt(T a[], int st, int nd) {
  for (register int i = st; i <= nd; ++i) ot(a[i]);
  putchar('\n');
}
namespace Modulo {
const int mod = 998244353;
int ad(int x, int y) { return (x + y) >= mod ? x + y - mod : x + y; }
void inc(int &x, int y) { x = ad(x, y); }
int mul(int x, int y) { return (long long)x * y % mod; }
void inc2(int &x, int y) { x = mul(x, y); }
int qm(int x, int y = mod - 2) {
  int ret = 1;
  while (y) {
    if (y & 1) ret = mul(x, ret);
    x = mul(x, x);
    y >>= 1;
  }
  return ret;
}
template <class... Args>
inline int ad(const int a, const int b, const Args &...args) {
  return ad(ad(a, b), args...);
}
template <class... Args>
inline int mul(const int a, const int b, const Args &...args) {
  return mul(mul(a, b), args...);
}
}  // namespace Modulo
using namespace Modulo;
namespace Miracle {
const int N = 5e5 + 5;
int n;
struct node {
  int nxt, to;
} e[2 * N];
int hd[N], cnt;
void add(int x, int y) {
  e[++cnt].nxt = hd[x];
  e[cnt].to = y;
  hd[x] = cnt;
}
int f[N][2], g[N][2];
void dfs(int x, int fa) {
  g[x][0] = 1;
  for (register int i = hd[x]; i; i = e[i].nxt) {
    int y = e[i].to;
    if (y == fa) continue;
    dfs(y, x);
    int f1 = 0, f0 = 0, g1 = 0, g0 = 0;
    inc(f1, ad(mul(f[x][0], g[y][0]), mul(g[x][0], f[y][0]),
               mul(g[x][0], g[y][0])));
    inc(f1, ad(mul(f[x][1], g[y][0]), mul(g[x][1], f[y][0]),
               mul(f[x][1], g[y][1]), mul(g[x][1], f[y][1])));
    inc(g1, ad(mul(g[x][0], g[y][0]), mul(g[x][1], g[y][0]),
               mul(g[x][1], g[y][1])));
    inc(f0, ad(mul(f[x][0], g[y][1]), mul(g[x][0], f[y][1])));
    inc(g0, mul(g[x][0], g[y][1]));
    inc(f1, ad(mul(f[x][1], ad(g[y][0], g[y][1])),
               mul(g[x][1], ad(f[y][0], f[y][1]))));
    inc(f0, ad(mul(f[x][0], ad(g[y][0], g[y][1])),
               mul(g[x][0], ad(f[y][0], f[y][1]))));
    inc(g1, mul(g[x][1], ad(g[y][0], g[y][1])));
    inc(g0, mul(g[x][0], ad(g[y][0], g[y][1])));
    f[x][1] = f1;
    f[x][0] = f0;
    g[x][1] = g1;
    g[x][0] = g0;
  }
}
int main() {
  rd(n);
  int x, y;
  for (register int i = 1; i < n; ++i) {
    rd(x);
    rd(y);
    add(x, y);
    add(y, x);
  }
  dfs(1, 0);
  int ans = mul(ad(f[1][0], f[1][1]), 2);
  ot(ans);
  return 0;
}
}  // namespace Miracle
signed main() {
  Miracle::main();
  return 0;
}
