#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
pair<long long, long long> egcd(long long a, long long b) {
  if (a == 0) {
    return make_pair(0, 1);
  }
  pair<long long, long long> prev = egcd(b % a, a);
  return make_pair(prev.second - (b / a) * prev.first, prev.first);
}
long long modInv(long long x) {
  pair<long long, long long> res = egcd(x, 998244353);
  res.first = (res.first + 998244353) % 998244353;
  return res.first;
}
long long modDiv(long long x, long long y) {
  return (x * modInv(y)) % 998244353;
}
int n;
int p[200005];
vector<int> ch[200005];
long long dp[200005][3];
void dfs(int cn) {
  if (ch[cn].size() == 0) {
    dp[cn][0] = 1;
    return;
  }
  long long tot = 1;
  long long sm = 0;
  long long ree[3];
  ree[1] = 1;
  for (int i = 0; i < (signed)(ch[cn].size()); i++) {
    int nn = ch[cn][i];
    dfs(nn);
    ree[1] = (ree[1] * (dp[nn][0] + dp[nn][1])) % 998244353;
    long long num = (dp[nn][0] + dp[nn][2]) % 998244353;
    long long den = (dp[nn][0] + dp[nn][1]) % 998244353;
    sm += modDiv(num, den);
    sm %= 998244353;
    tot *= (dp[nn][0] * 2 + dp[nn][1] + dp[nn][2]) % 998244353;
    tot %= 998244353;
  }
  ree[2] = (ree[1] * sm) % 998244353;
  ree[0] = (tot - ree[1] - ree[2]) % 998244353;
  ree[0] = (ree[0] + 998244353) % 998244353;
  for (int i = 0; i < (signed)(3); i++) {
    dp[cn][i] = ree[i];
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = (2); i <= (signed)(n); i++) {
    cin >> p[i];
    ch[p[i]].push_back(i);
  }
  dfs(1);
  cout << (dp[1][0] + dp[1][1]) % 998244353 << "\n";
  return 0;
}
