#include #include using namespace std; #define int long long // a^nを任意の数字でmodを取りつつ計算するやつ int modPow(int a, int n, int mod) { if (mod == 1) return 0; int ret = 1; int p = a % mod; while (n) { if (n & 1) ret = ret * p % mod; p = p * p % mod; n >>= 1; } return ret; } void testcase() { int N; cin >> N; int a, b; vector eda(N, 0); for (int i = 1; i < N; i++) { cin >> a >> b; a--; b--; eda[a]++; eda[b]++; } int ans = 0; for (int i = 0; i < N; i++) { ans += modPow(2, eda[i], 998244353); if (eda[i] == N - 1) ans -= 2; } cout << ans << '\n'; } int32_t main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); testcase(); return 0; }