#include using namespace std; using ll=long long; #define rep(i,n) for(int i=0;i=0;i--) #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} const ll MOD=998244353; void dfs(int x,int p,vector>&g,vector>&dp){ vectorA,B; for(auto i:g[x]){ if(i==p)continue; dfs(i,x,g,dp); A.push_back(dp[i][1]); B.push_back(dp[i][0]); } int l=A.size(); vectorL(l+1),R(l+1); L[0]=R[l]=1; rep(i,l)L[i+1]=L[i]*(A[i]+B[i])%MOD; rrep(i,l)R[i]=R[i+1]*(A[i]+B[i])%MOD; dp[x][0]=dp[x][1]=L[l]; rep(i,l){ dp[x][1]+=A[i]*(L[i]*R[i+1]%MOD)%MOD; } } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin>>n; vector>g(n); rep(i,n-1){ int a,b; cin>>a>>b; a--; b--; g[a].push_back(b); g[b].push_back(a); } vector>dp(n,vector(2)); dfs(0,-1,g,dp); ll ans=dp[0][1]; cout<