Vasya has a tree with n vertices numbered from 1 to n, and n - 1 edges numbered from 1 to n - 1. Initially each vertex contains a token with the number of the vertex written on it.

Vasya plays a game. He considers all edges of the tree by increasing of their indices. For every edge he acts as follows:

  * If both endpoints of the edge contain a token, remove a token from one of the endpoints and write down its number.
  * Otherwise, do nothing.



The result of the game is the sequence of numbers Vasya has written down. Note that there may be many possible resulting sequences depending on the choice of endpoints when tokens are removed.

Vasya has played for such a long time that he thinks he exhausted all possible resulting sequences he can obtain. He wants you to verify him by computing the number of distinct sequences modulo 998 244 353.

Input

The first line contains a single integer n (2 ≤ n ≤ 2 ⋅ 10^5) — the number of vertices of the tree.

The next n - 1 lines describe edges of the tree. The i-th of these lines contains two integers u_i, v_i (1 ≤ u_i, v_i ≤ n) — endpoints of the edge with index i. It is guaranteed that the given graph is indeed a tree.

Output

Print a single integer — the number of distinct sequences modulo 998 244 353.

Examples

Input


5
1 2
1 3
1 4
1 5


Output


5


Input


7
7 2
7 6
1 2
7 5
4 7
3 5


Output


10

Note

In the first sample case the distinct sequences are (1), (2, 1), (2, 3, 1), (2, 3, 4, 1), (2, 3, 4, 5).

Int the second sample case the distinct sequences are (2, 6, 5, 3), (2, 6, 5, 7), (2, 6, 7, 2), (2, 6, 7, 5), (2, 7, 3), (2, 7, 5), (7, 1, 3), (7, 1, 5), (7, 2, 3), (7, 2, 5).
#include <bits/stdc++.h>
using namespace std;
int n, i, j, k, x, y;
vector<int> e[200005];
long long f[200005][4], pre[200005], nex[200005];
void DFS(int x, int p) {
  int fi = 0, y, k;
  for (int i = 0; i < e[x].size(); i++)
    if (e[x][i] == p) {
      fi = i;
      break;
    }
  for (int i = 0; i < e[x].size(); i++)
    if (e[x][i] != p) DFS(e[x][i], x);
  f[x][0] = f[x][2] = pre[0] = 1;
  for (int i = 0; i < e[x].size(); i++)
    if (e[x][i] != p) {
      y = e[x][i];
      (f[x][0] *= (f[y][1] + f[y][2]) % 998244353) %= 998244353;
      if (i < fi) (f[x][2] *= (f[y][1] + f[y][2]) % 998244353) %= 998244353;
      if (i > fi)
        (f[x][2] *= (f[y][0] + f[y][1] + f[y][3]) % 998244353) %= 998244353;
      pre[i + 1] = ((f[y][1] + f[y][2]) % 998244353 * pre[i]) % 998244353;
    } else
      pre[i + 1] = pre[i];
  nex[e[x].size()] = 1;
  for (int i = e[x].size() - 1; i >= 0; i--)
    if (e[x][i] != p) {
      y = e[x][i];
      nex[i] =
          ((f[y][0] + f[y][1] + f[y][3]) % 998244353 * nex[i + 1]) % 998244353;
    } else
      nex[i] = nex[i + 1];
  for (int i = 0; i < e[x].size(); i++)
    if (e[x][i] != p) {
      y = e[x][i], k = (i < fi) ? 1 : 3;
      f[x][k] += (f[y][0] + f[y][3]) % 998244353 * pre[i] % 998244353 *
                 nex[i + 1] % 998244353;
    }
  f[x][1] %= 998244353, f[x][3] %= 998244353;
}
int main() {
  scanf("%d", &n);
  for (i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    e[x].push_back(y);
    e[y].push_back(x);
  }
  DFS(1, 0);
  printf("%lld", (f[1][0] + f[1][1] + f[1][3]) % 998244353);
}
