#include <bits/stdc++.h>
using std::vector;
const int MAXN = 2e5 + 50;
const int M = 998244353;
vector<int> E[MAXN];
int f[MAXN], g[MAXN], h[MAXN];
int f2, g2, h2;
void dfs(int u) {
  if ((int)E[u].size() == 0)
    g[u] = 1;
  else
    f[u] = 1;
  for (int v : E[u]) {
    dfs(v);
    f2 = f[u], g2 = g[u], h2 = h[u];
    f[u] = 1ll * f2 * ((long long)f[v] + g[v]) % M;
    g[u] = (1ll * g2 * ((long long)f[v] + h[v] + 2ll * g[v]) % M +
            1ll * h2 * ((long long)g[v] + h[v]) % M) %
           M;
    h[u] = (1ll * f2 * ((long long)h[v] + g[v]) % M +
            1ll * h2 * ((long long)f[v] + g[v]) % M) %
           M;
  }
}
inline int read() {
  int x = 0;
  char c = getchar();
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9')
    x = (x << 3) + (x << 1) + (48 ^ c), c = getchar();
  return x;
}
int main() {
  int n = read();
  for (int i = 2; i <= n; ++i) {
    int pi = read();
    E[pi].push_back(i);
  }
  dfs(1);
  printf("%d", (f[1] + g[1]) % M);
}
