#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
const long long mod = 998244353;
vector<long long> adj[N];
long long dp[N][4], f[N][3];
void dfs(long long x) {
  if (adj[x].size() == 0) {
    dp[x][2] = 1;
    return;
  } else {
    dp[x][0] = 1;
  }
  for (long long i : adj[x]) {
    dfs(i);
    dp[x][2] = (dp[x][2] * (dp[i][0] + dp[i][2]) +
                (dp[x][1] + dp[x][2]) * (dp[i][1] + dp[i][2])) %
               mod;
    dp[x][1] =
        (dp[x][1] * (dp[i][0] + dp[i][2]) + dp[x][0] * (dp[i][1] + dp[i][2])) %
        mod;
    dp[x][0] = (dp[x][0] * (dp[i][0] + dp[i][2])) % mod;
  }
}
signed main() {
  long long n, i, j, k;
  cin >> n;
  for (i = 2; i <= n; i++) {
    cin >> j;
    adj[j].push_back(i);
  }
  dfs(1);
  cout << (dp[1][0] + dp[1][2]) % mod;
}
