#include <bits/stdc++.h>
using namespace std;
const long long N = 300100;
long long n, x, y, d[2][2][N], p[N];
vector<long long> v[N];
void dfs(long long x, long long pr) {
  long long mul = 1, out = v[x].size() - 1, n00, n01, n10, n11;
  d[0][0][x] = 1;
  d[0][1][x] = 1;
  d[1][0][x] = 0;
  d[1][1][x] = 0;
  for (long long to : v[x]) {
    if (to == pr) continue;
    dfs(to, x);
    n00 = d[0][0][x] * (d[0][0][to] + d[1][0][to] + d[1][1][to]);
    n01 = d[0][1][x] * (d[0][0][to] + d[1][0][to] + d[1][1][to]);
    ;
    n10 = d[1][0][x] *
              (2 * d[0][0][to] + d[0][1][to] + 2 * d[1][0][to] +
               2 * d[1][1][to]) %
              998244353 +
          d[0][0][x] * (d[0][0][to] + d[0][1][to] + d[1][0][to] + d[1][1][to]) %
              998244353;
    n11 = d[1][1][x] * (2 * d[0][0][to] + 2 * d[1][0][to] + d[1][1][to]) %
              998244353 +
          d[0][1][x] * (d[0][0][to] + d[1][0][to]) % 998244353;
    d[0][0][x] = n00 % 998244353;
    d[0][1][x] = n01 % 998244353;
    d[1][0][x] = n10 % 998244353;
    d[1][1][x] = n11 % 998244353;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  p[0] = 1;
  for (long long i = 1; i <= n; i++) p[i] = p[i - 1] * 2 % 998244353;
  for (long long i = 1; i < n; i++)
    cin >> x >> y, v[x].push_back(y), v[y].push_back(x);
  dfs(1, 0);
  cout << (d[1][0][1] + d[1][1][1] + d[0][0][1] - 1 + 998244353) % 998244353;
}
