#include using namespace std; #define int long long const int p=998244353; const int maxn=2e5+5; vector a[maxn]; bool used[maxn]; int dp[maxn][2]; void dfs(int x) { used[x]=true; dp[x][0]=1;dp[x][1]=1; for(int v:a[x]) { if(!used[v]) { dfs(v); dp[x][1]=(dp[x][0]*dp[v][1]+dp[x][1]*dp[v][0]+dp[x][1]*dp[v][1]); dp[x][1]%=p; dp[x][0]=(dp[x][0]*dp[v][0]+dp[x][0]*dp[v][1]); dp[x][0]%=p; } } } int32_t main() { ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); int n;cin>>n; for(int i=0;i>x>>y;--x;--y; a[x].push_back(y);a[y].push_back(x); } dfs(0); cout<<(dp[0][1]%p+p)%p; return 0; }