func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 3e5 + 50, mo = 998244353;   int head[N], nn[N << 1][2], cnt;   void link(int u, int v) {     nn[++cnt][1] = v, nn[cnt][0] = head[u], head[u] = cnt;     nn[++cnt][1] = u, nn[cnt][0] = head[v], head[v] = cnt;     return;   }   int f[N][3];   void dfs(int x, int fa) {     f[x][0] = 1;     for (int i = head[x], y; i; i = nn[i][0])       if ((y = nn[i][1]) != fa) {         dfs(y, x);         int s1 = f[x][1], s2 = f[x][2];         f[x][1] = (1ll * (f[x][0] + s2) * (f[y][0] + f[y][2]) % mo +                    2ll * s1 * f[y][1] % mo + 1ll * s1 * f[y][0]) %                   mo;         f[x][2] =             (2ll * s2 * f[y][1] + 1ll * f[x][0] * f[y][1] + 1ll * s2 * f[y][0]) %             mo;         f[x][0] = 1ll * f[x][0] * (f[y][0] + f[y][1]) % mo;       }     return;   }   int main() {     int n, u, v;     cin >> n;     for (int i = 1; i < n; ++i) scanf( %d%d , &u, &v), link(u, v);     dfs(1, 0);     cout << (f[1][0] + f[1][1]) % mo;     return 0;   }   