#include <bits/stdc++.h>
#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("avx2")
using namespace std;
const int p = 998244353;
vector<vector<int> > child;
long long Pow(long long a, int n) {
  if (n == 0) {
    return 1;
  }
  if (n % 2 == 0) {
    return Pow((a * a) % p, n / 2);
  }
  return (Pow((a * a) % p, n / 2) * a) % p;
}
void DFS(int a, long long &req_fix, long long &not_req_fix) {
  if (child[a].empty()) {
    req_fix = 1;
    not_req_fix = 1;
    return;
  }
  long long prod_of_sums = 1, prod_not_req_fix = 1, sum = 0;
  for (int b : child[a]) {
    long long cur_req_fix, cur_not_req_fix;
    DFS(b, cur_req_fix, cur_not_req_fix);
    prod_of_sums = (prod_of_sums * (cur_req_fix + cur_not_req_fix)) % p;
    prod_not_req_fix = (prod_not_req_fix * cur_not_req_fix) % p;
    sum = (sum + cur_req_fix * Pow(cur_not_req_fix, p - 2)) % p;
  }
  req_fix = (prod_of_sums - prod_not_req_fix) % p;
  not_req_fix = (prod_of_sums - prod_not_req_fix * sum) % p;
}
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  child.resize(n);
  for (int i = 1; i < n; i++) {
    int par;
    cin >> par;
    par--;
    child[par].push_back(i);
  }
  long long req_fix, not_req_fix;
  DFS(0, req_fix, not_req_fix);
  cout << ((not_req_fix % p) + p) % p << endl;
}
