#include <bits/stdc++.h>
using namespace std;
const int MAXN = 202020;
const long long MOD = 998244353;
int N, par[MAXN];
vector<int> child[MAXN];
pair<long long, long long> solve(int n) {
  if (child[n].size() == 0) {
    return {1, 1};
  }
  vector<pair<long long, long long>> subtrees;
  long long cumul = 1;
  long long no_leftovers_at_all = 1;
  for (int i = 0; i < child[n].size(); ++i) {
    subtrees.push_back(solve(child[n][i]));
    cumul = (cumul * (subtrees.back().first + subtrees.back().second)) % MOD;
    no_leftovers_at_all = (no_leftovers_at_all * subtrees.back().second) % MOD;
  }
  long long with_leftover = (cumul - no_leftovers_at_all + MOD) % MOD;
  vector<long long> prefix(subtrees.size(), 0), suffix(subtrees.size(), 0);
  long long pprod = 1;
  for (int i = 0; i < subtrees.size(); ++i) {
    pprod = (pprod * subtrees[i].second) % MOD;
    prefix[i] = pprod;
  }
  long long sprod = 1;
  for (int i = subtrees.size() - 1; i >= 0; --i) {
    sprod = (sprod * subtrees[i].second) % MOD;
    suffix[i] = sprod;
  }
  long long without_leftover = cumul;
  for (int i = 0; i < subtrees.size(); ++i) {
    long long remove = ((i == 0 ? 1 : prefix[i - 1]) *
                        (i == subtrees.size() - 1 ? 1 : suffix[i + 1])) %
                       MOD;
    remove = (remove * subtrees[i].first) % MOD;
    without_leftover = (without_leftover - remove + MOD) % MOD;
  }
  return {with_leftover, without_leftover};
}
int main() {
  scanf("%d", &N);
  for (int i = 2; i <= N; ++i) {
    scanf("%d", &par[i]);
    child[par[i]].push_back(i);
  }
  pair<long long, long long> res = solve(1);
  printf("%lld\n", res.second);
  return 0;
}
