#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 5, inf = 1e18, mod = 998244353;
long long n, dp[4][maxn], suf[maxn], pre[maxn];
vector<long long> adj[maxn];
void dfs(long long u, long long par) {
  long long z0 = 1, z2 = 1;
  bool leaf = 1;
  for (long long j : adj[u]) {
    if (j == par) continue;
    leaf = 0;
    dfs(j, u);
    (z0 *= ((dp[0][j] + dp[2][j]) % mod)) %= mod;
    (z2 *= ((dp[0][j] + dp[1][j] + dp[2][j] * 2ll + dp[3][j]) % mod)) %= mod;
  }
  if (leaf) {
    dp[0][u] = 1;
    dp[1][u] = 1;
    return;
  }
  dp[0][u] = z0;
  dp[2][u] = (z2 - z0 + mod) % mod;
  long long x = 1;
  long long sz = adj[u].size();
  for (long long i = 0; i < sz; i++) {
    long long v = adj[u][i];
    if (v == par) continue;
    suf[i] = x;
    x = x * ((dp[0][v] + dp[2][v]) % mod) % mod;
  }
  x = 1;
  for (long long i = sz - 1; i >= 0; i--) {
    long long v = adj[u][i];
    if (v == par) continue;
    pre[i] = x;
    x = x * ((dp[0][v] + dp[2][v]) % mod) % mod;
  }
  for (long long i = 0; i < sz; i++) {
    long long j = adj[u][i];
    if (j == par) continue;
    dp[1][u] =
        (dp[1][u] + (dp[1][j] % mod * suf[i] % mod * pre[i] % mod)) % mod;
    dp[3][u] = (dp[3][u] +
                ((dp[3][j] + dp[2][j]) % mod * suf[i] % mod * pre[i] % mod)) %
               mod;
    long long sum = ((dp[1][j] + dp[2][j] + dp[3][j]) % mod);
    dp[2][u] = (dp[2][u] - (sum * suf[i] % mod * pre[i] % mod) + mod) % mod;
  }
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  for (long long i = 2; i <= n; i++) {
    long long p;
    cin >> p;
    adj[p].push_back(i);
    adj[i].push_back(p);
  }
  dfs(1, 1);
  cout << (dp[0][1] + dp[2][1]) % mod << endl;
}
