#include <bits/stdc++.h>
namespace tree {
const int N = 501000, MOD = 998244353;
inline void inc(int a, int &b) { b = (a + b) % MOD; }
int begin[N], next[N * 2], to[N * 2];
int f[N][2], siz[N][2];
int n, e;
void add(int x, int y, bool k = 1) {
  to[++e] = y;
  next[e] = begin[x];
  begin[x] = e;
  if (k) add(y, x, 0);
}
void dfs(int p = 1, int h = 0) {
  f[p][0] = 0, f[p][1] = 0;
  siz[p][0] = 1, siz[p][1] = 0;
  for (int i = begin[p], q; i; i = next[i])
    if ((q = to[i]) != h) {
      dfs(q, p);
      int F[2] = {0}, S[2] = {0};
      for (int cut = 0; cut <= 1; cut++)
        for (int x = 0; x <= 1; x++)
          for (int y = 0; y <= 1; y++) {
            if (!cut && !x && !y) {
              inc((long long)f[p][x] * siz[q][y] % MOD, F[1]);
              inc((long long)f[q][y] * siz[p][x] % MOD, F[1]);
              inc((long long)siz[p][x] * siz[q][y] % MOD, F[1]);
              inc((long long)siz[p][x] * siz[q][y] % MOD, S[1]);
            } else {
              inc((long long)f[p][x] * siz[q][y] % MOD, F[x]);
              inc((long long)f[q][y] * siz[p][x] % MOD, F[x]);
              inc((long long)siz[p][x] * siz[q][y] % MOD, S[x]);
            }
          }
      f[p][0] = F[0], siz[p][0] = S[0];
      f[p][1] = F[1], siz[p][1] = S[1];
    }
}
void solve() {
  scanf("%d", &n);
  for (int i = 1, u, v; i < n; i++) scanf("%d%d", &u, &v), add(u, v);
  dfs();
  int ans = (f[1][0] + f[1][1]) * 2ll % MOD;
  ans = (ans + MOD) % MOD;
  printf("%d\n", ans);
}
}  // namespace tree
int main() {
  tree::solve();
  return 0;
}
