#include <bits/stdc++.h>
using namespace std;
const int N = 200005, Mod = 998244353;
int n, dp[N][2];
vector<int> Adj[N];
int main() {
  scanf("%d", &n);
  for (int i = 2, p; i <= n; i++) scanf("%d", &p), Adj[p].push_back(i);
  for (int v = n; v; v--) {
    dp[v][0] = dp[v][1] = 1;
    if (!Adj[v].size()) continue;
    dp[v][1] = 0;
    long long mul = 1;
    for (int &u : Adj[v]) {
      long long dp0 = dp[v][0], dp1 = dp[v][1];
      dp[v][0] = (dp0 * dp[u][0] + dp1 * dp[u][1]) % Mod;
      dp[v][1] = (dp1 * (dp[u][0] + dp[u][1]) + mul * dp[u][1]) % Mod;
      mul = mul * dp[u][0] % Mod;
    }
  }
  return !printf("%d", dp[1][0]);
}
