#include #include #include using namespace std; int main() { const int mod = 998244353; int n; cin >> n; vector cnt(n); for (int i = 1; i < n; ++i) { int a, b; cin >> a >> b; --a, --b; ++cnt[a]; ++cnt[b]; } vector p2(n); p2[0] = 1; for (int i = 0; i < n - 1; ++i) p2[i + 1] = p2[i] * 2LL % mod; long long ans = 0; for (int i = 0; i < n; ++i) ans = (ans + (cnt[i] != n - 1 ? p2[cnt[i]] : p2[cnt[i]] - 2)) % mod; cout << ans << endl; }