#include using LL = long long; const int N = 2e5 + 7; const int MOD = 998244353; std::vector e[N]; LL f[N], g[N]; int n; void dp(int x, int y) { f[x] = g[x] = 1; for(int v: e[x]) if(v != y) { dp(v, x); LL tf = f[x], tg = g[x]; f[x] = (tf * f[v] + tf * g[v] + tg * f[v]) % MOD; g[x] = (tg * f[v] + tg * g[v]) % MOD; } } int main() { scanf("%d", &n); for(int i = 1, x, y; i < n; ++i) { scanf("%d%d", &x, &y); e[x].push_back(y); e[y].push_back(x); } dp(1, -1); printf("%lld\n", f[1]); return 0; }