Vasya has got a tree consisting of n vertices. He wants to delete some (possibly zero) edges in this tree such that the maximum matching in the resulting graph is unique. He asks you to calculate the number of ways to choose a set of edges to remove.

A matching in the graph is a subset of its edges such that there is no vertex incident to two (or more) edges from the subset. A maximum matching is a matching such that the number of edges in the subset is maximum possible among all matchings in this graph.

Since the answer may be large, output it modulo 998244353.

Input

The first line contains one integer n (1 ≤ n ≤ 3 ⋅ 10^5) — the number of vertices in the tree.

Each of the next n − 1 lines contains two integers u and v (1 ≤ u, v ≤ n, u ≠ v) denoting an edge between vertex u and vertex v. It is guaranteed that these edges form a tree.

Output

Print one integer — the number of ways to delete some (possibly empty) subset of edges so that the maximum matching in the resulting graph is unique. Print the answer modulo 998244353.

Examples

Input

4
1 2
1 3
1 4


Output

4


Input

4
1 2
2 3
3 4


Output

6


Input

1


Output

1

Note

Possible ways to delete edges in the first example: 

  * delete (1, 2) and (1, 3). 
  * delete (1, 2) and (1, 4). 
  * delete (1, 3) and (1, 4). 
  * delete all edges. 



Possible ways to delete edges in the second example: 

  * delete no edges. 
  * delete (1, 2) and (2, 3). 
  * delete (1, 2) and (3, 4). 
  * delete (2, 3) and (3, 4). 
  * delete (2, 3). 
  * delete all edges. 
#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &a) {
  T x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + (ch ^ 48);
    ch = getchar();
  }
  a = x * f;
}
template <typename T>
void write(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x < 10) return (void)putchar(x + '0');
  write(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
void writeln(T x) {
  write(x);
  putchar('\n');
}
template <typename T>
void writes(T x) {
  write(x);
  putchar(' ');
}
template <typename T, typename... Args>
void read(T &t, Args &...args) {
  read(t);
  read(args...);
}
template <typename T, typename... Args>
void writes(T t, Args... args) {
  writes(t);
  writes(args...);
}
template <typename T, typename... Args>
void writeln(T t, Args... args) {
  writes(t);
  writes(args...);
  putchar('\n');
}
const long long mod = 998244353;
long long n, head[300005], pnt[300005 << 1], nxt[300005 << 1], E = 0;
long long dp[300005][3];
void add_edge(long long u, long long v) {
  pnt[E] = v;
  nxt[E] = head[u];
  head[u] = E++;
}
void dfs(long long u, long long f) {
  dp[u][0] = 1;
  for (long long i = head[u]; i != -1; i = nxt[i]) {
    long long v = pnt[i];
    if (v == f) continue;
    dfs(v, u);
    dp[u][2] =
        (dp[u][0] * (dp[v][0] + dp[v][1]) + dp[u][1] * (dp[v][0] + dp[v][1]) +
         dp[u][2] * (dp[v][0] + dp[v][2] * 2)) %
        mod;
    dp[u][1] =
        (dp[u][0] * dp[v][2] + dp[u][1] * (dp[v][0] + 2 * dp[v][2])) % mod;
    dp[u][0] = dp[u][0] * (dp[v][0] + dp[v][2]) % mod;
  }
}
signed main() {
  memset(head, -1, sizeof(head));
  read(n);
  for (long long i = 1; i < n; i++) {
    long long u, v;
    read(u, v);
    add_edge(u, v);
    add_edge(v, u);
  }
  dfs(1, 0);
  writeln((dp[1][0] + dp[1][2]) % mod);
  return 0;
}
