#include <bits/stdc++.h>
using namespace std;
int read() {
  int q = 0;
  char ch = ' ';
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9') q = q * 10 + ch - '0', ch = getchar();
  return q;
}
const int mod = 998244353, N = 500005;
int n, tot;
int h[N], ne[N << 1], to[N << 1], f[N][2], g[N][2];
int qm(int x) { return x >= mod ? x - mod : x; }
void add(int x, int y) { to[++tot] = y, ne[tot] = h[x], h[x] = tot; }
void dfs(int x, int las) {
  f[x][0] = f[x][1] = 0, g[x][0] = 1, g[x][1] = 0;
  for (register int i = h[x]; i; i = ne[i]) {
    if (to[i] == las) continue;
    int y = to[i];
    dfs(y, x);
    int kf[2], kg[2];
    kf[0] = kf[1] = kg[0] = kg[1] = 0;
    kf[1] = qm(kf[1] + qm(1LL * f[x][0] * g[y][0] % mod +
                          qm(1LL * g[x][0] * f[y][0] % mod +
                             1LL * g[x][0] * g[y][0] % mod)));
    kg[1] = qm(kg[1] + 1LL * g[x][0] * g[y][0] % mod);
    for (register int c = 0; c <= 1; ++c)
      for (register int a = 0; a <= 1; ++a)
        for (register int b = 0; b <= 1; ++b)
          if (c || a || b) {
            kf[a] = qm(kf[a] + qm(1LL * f[x][a] * g[y][b] % mod +
                                  1LL * g[x][a] * f[y][b] % mod));
            kg[a] = qm(kg[a] + 1LL * g[x][a] * g[y][b] % mod);
          }
    f[x][0] = kf[0], f[x][1] = kf[1], g[x][0] = kg[0], g[x][1] = kg[1];
  }
}
int main() {
  int x, y;
  n = read();
  for (register int i = 1; i < n; ++i)
    x = read(), y = read(), add(x, y), add(y, x);
  dfs(1, 0);
  printf("%d\n", qm(qm(f[1][0] + f[1][1]) + qm(f[1][0] + f[1][1])));
  return 0;
}
