#include <bits/stdc++.h>
using namespace std;
const int n0 = 2e5 + 123, mod = 998244353;
int n;
long long dp[3][n0];
vector<int> g[n0];
void dfs(int v, int p) {
  long long t[3];
  t[0] = 1, t[1] = t[2] = 0;
  int ch = 0;
  for (int to : g[v]) {
    if (to == p) continue;
    ch++;
    dfs(to, v);
    long long in = dp[1][to] + dp[2][to], out = dp[0][to] + dp[2][to];
    t[2] = (t[1] * in + t[2] * (in + out)) % mod;
    t[1] = (t[0] * in + t[1] * out) % mod;
    t[0] = (t[0] * out) % mod;
  }
  if (!ch) {
    dp[2][v] = 1;
    return;
  }
  dp[0][v] = t[0];
  dp[1][v] = t[1];
  dp[2][v] = t[2];
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n;
  for (int i = 2; i <= n; i++) {
    int x;
    cin >> x;
    g[x].push_back(i);
  }
  dfs(1, 1);
  cout << (dp[0][1] + dp[2][1]) % mod;
}
