#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5, P = 998244353;
int n;
long long f[N], g[N], h[N];
vector<int> G[N];
void dfs(int u) {
  if (G[u].empty()) {
    g[u] = 1;
    return;
  }
  h[u] = 1;
  for (int v : G[u])
    dfs(v),
        g[u] =
            (g[u] * (f[v] + 2 * g[v] + h[v]) % P + f[u] * (f[v] + g[v]) % P) %
            P,
        f[u] = (f[u] * (g[v] + h[v]) % P + h[u] * (f[v] + g[v]) % P) % P,
        (h[u] *= h[v] + g[v]) %= P;
}
int main() {
  scanf("%d", &n);
  for (int i = 2, x; i <= n; ++i) scanf("%d", &x), G[x].push_back(i);
  dfs(1), printf("%lld", (g[1] + h[1]) % P);
  return 0;
}
