#include using namespace std; using ll=long long; using pii=pair; #define all(a) a.begin(),a.end() #define pb push_back #define sz(a) ((int)a.size()) const int maxn=200005,mod=998244353; int add(int x, int y){x+=y; if(x>=mod) x-=mod; return x;} int mul(int x, int y){return ((ll)x)*y%mod;} int n,dp[maxn][2]; vector adj[maxn]; void dfs(int u, int par){ for(auto v: adj[u]) if(v!=par) dfs(v,u); int tot=1; vector vec; for(auto v: adj[u]) if(v!=par) tot=mul(tot,dp[v][0]),vec.pb(dp[v][0]); dp[u][0]=add(tot,tot),dp[u][1]=tot; int cur=0; for(int i=sz(vec)-2; i>=0; --i) vec[i]=mul(vec[i],vec[i+1]); vec.pb(1); tot=1; for(auto v: adj[u]) if(v!=par){ int de=mul(tot,mul(dp[v][1],vec[++cur])); dp[u][0]=add(dp[u][0],de),dp[u][1]=add(dp[u][1],de); tot=mul(tot,dp[v][0]); } } signed main(){ ios_base::sync_with_stdio(0),cin.tie(0); cin >> n; for(int i=0; i> u >> v; u--,v--; adj[u].pb(v),adj[v].pb(u); } dfs(0,-1); cout << dp[0][1] << "\n"; }