#include <bits/stdc++.h>
using namespace std;
const int DN = 2e5 + 5, M = 998244353;
long long n, dp[3][DN], pr[DN], lst[3];
vector<int> v[DN];
void dfs(int nod) {
  if (v[nod].empty()) {
    dp[2][nod] = 1;
    return;
  }
  for (auto i : v[nod]) dfs(i);
  dp[0][nod] = 1;
  for (auto i : v[nod]) {
    lst[0] = dp[0][nod];
    lst[1] = dp[1][nod];
    lst[2] = dp[2][nod];
    dp[0][nod] = (1LL * lst[0] * (dp[2][i] + dp[0][i])) % M;
    dp[1][nod] = (1LL * lst[0] * (dp[1][i] + dp[2][i]) +
                  1LL * lst[1] * (dp[0][i] + dp[2][i])) %
                 M;
    dp[2][nod] = (1LL * lst[2] * (dp[0][i] + dp[2][i] * 2 + dp[1][i]) +
                  1LL * lst[1] * (dp[1][i] + dp[2][i])) %
                 M;
  }
}
int main() {
  cin >> n;
  for (int i = 2; i <= n; i++) {
    cin >> pr[i];
    v[pr[i]].push_back(i);
  }
  dfs(1);
  dp[0][1] = (dp[0][1] + dp[2][1]) % M;
  cout << dp[0][1];
}
