#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Arr = array<ll, 3>;
const ll MOD = 998244353;
const int N = 200010;
int n;
ll f[N], g[N];
vector<int> graph[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int p;
    scanf("%d", &p);
    p--;
    graph[p].push_back(i);
  }
  for (int v = n - 1; v >= 0; v--) {
    if (graph[v].empty()) {
      f[v] = g[v] = 1;
      continue;
    }
    Arr t = {1, 0, 0};
    for (int u : graph[v]) {
      Arr nt;
      nt[0] = (t[0] * f[u]) % MOD;
      nt[1] = (t[0] * g[u] + t[1] * f[u]) % MOD;
      nt[2] = (t[1] * g[u] + t[2] * (f[u] + g[u])) % MOD;
      swap(t, nt);
    }
    f[v] = (t[0] + t[2]) % MOD;
    g[v] = (t[1] + t[2]) % MOD;
  }
  printf("%lld\n", f[0]);
}
