#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
vector<int> g[200010];
int n;
long long dp[2][200010];
void dfs(int u) {
  if (g[u].size() == 0) {
    dp[0][u] = dp[1][u] = 1;
    return;
  }
  long long tmp[3] = {0};
  tmp[0] = 1;
  for (int v : g[u]) {
    dfs(v);
    tmp[2] =
        (tmp[2] * (dp[0][v] + dp[1][v]) % mod + tmp[1] * dp[1][v] % mod) % mod;
    tmp[1] = (tmp[0] * dp[1][v] + tmp[1] * dp[0][v]) % mod;
    tmp[0] = tmp[0] * dp[0][v] % mod;
  }
  dp[0][u] = (tmp[0] + tmp[2]) % mod;
  dp[1][u] = (tmp[1] + tmp[2]) % mod;
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) {
    int x;
    scanf("%d", &x);
    g[x].push_back(i);
  }
  dfs(1);
  printf("%lld\n", dp[0][1]);
  return 0;
}
