#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) { return (!y ? x : gcd(y, x % y)); }
const int maxn = 2e5 + 10, mod = 998244353;
inline int ad(int x, int y) { return x + y < mod ? x + y : x + y - mod; }
inline int mu(int x, int y) { return 1LL * x * y % mod; }
int dp[maxn][3], odp[maxn][3], tot[maxn];
int b[3], nb[3];
vector<int> adj[maxn];
void dfs(int v) {
  if (adj[v].size() == 0) {
    dp[v][2] = 1;
    tot[v] = 1;
    return;
  }
  for (auto u : adj[v]) dfs(u);
  dp[v][0] = 1;
  for (auto u : adj[v]) {
    for (int i = 0; i < 3; i++) odp[v][i] = 0;
    odp[v][0] = mu(dp[v][0], ad(dp[u][0], dp[u][2]));
    odp[v][1] = ad(mu(dp[v][0], ad(dp[u][1], dp[u][2])),
                   mu(dp[v][1], ad(dp[u][0], dp[u][2])));
    odp[v][2] = ad(mu(dp[v][2], ad(tot[u], dp[u][2])),
                   mu(dp[v][1], ad(dp[u][1], dp[u][2])));
    for (int i = 0; i < 3; i++) dp[v][i] = odp[v][i];
  }
  tot[v] = ad(dp[v][0], ad(dp[v][1], dp[v][2]));
}
int32_t main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i < n; i++) {
    int p;
    cin >> p;
    adj[p - 1].push_back(i);
  }
  dfs(0);
  cout << ad(dp[0][0], dp[0][2]) << '\n';
}
