#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int dp[300010][2], cnt[300010];
vector<int> v[300010];
void add(int &a, int b) {
  a += b;
  if (a >= mod) a -= mod;
  if (a < 0) a += mod;
}
void dfs(int nod, int tata) {
  int ok = 0, ans = 1, p0 = 1;
  cnt[nod] = 1;
  dp[nod][0] = dp[nod][1] = 1;
  for (int i = 0; i < v[nod].size(); i++)
    if (v[nod][i] != tata) {
      ok = 1;
      dfs(v[nod][i], nod);
      int tot = dp[v[nod][i]][0];
      add(tot, dp[v[nod][i]][1]);
      add(tot, -cnt[v[nod][i]]);
      cnt[nod] = (1LL * cnt[nod] * tot) % mod;
      dp[nod][0] = (1LL * dp[nod][0] *
                    ((1LL * tot + dp[v[nod][i]][0] + dp[v[nod][i]][1]) % mod)) %
                   mod;
      dp[nod][1] =
          (1LL * dp[nod][1] * ((1LL * tot + dp[v[nod][i]][0]) % mod)) % mod;
    }
}
int main() {
  int n, x, y;
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  dfs(1, 0);
  int ans = dp[1][0];
  add(ans, dp[1][1]);
  add(ans, -cnt[1] - 1);
  printf("%d", ans);
  return 0;
}
