#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10, mo = 998244353;
struct zy {
  int to, ne;
} e[N];
int f[N], g[N], w[N];
int n, i, l;
inline int read() {
  int x = 0;
  char c = getchar();
  while (c < '0' || c > '9') c = getchar();
  while ('0' <= c && c <= '9')
    x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
  return x;
}
inline int ksm(int x, int y) {
  int s = 1;
  while (y) {
    if (y & 1) s = 1ll * s * x % mo;
    x = 1ll * x * x % mo;
    y >>= 1;
  }
  return s;
}
inline void ad(int x, int y) {
  e[++l].to = y;
  e[l].ne = w[x];
  w[x] = l;
}
void dfs(int x) {
  f[x] = g[x] = 1;
  int s = 1, z = 1;
  if (!w[x]) return;
  for (int i = w[x]; i; i = e[i].ne) {
    dfs(e[i].to);
    s = 1ll * s * 1ll * (f[e[i].to] + g[e[i].to]) % mo;
    z = 1ll * z * f[e[i].to] % mo;
  }
  f[x] = g[x] = s;
  for (int i = w[x]; i; i = e[i].ne)
    f[x] =
        (1ll * f[x] - 1ll * g[e[i].to] * z % mo * ksm(f[e[i].to], mo - 2)) % mo;
  f[x] = (f[x] + mo) % mo;
  g[x] = (1ll * g[x] - z + mo) % mo;
}
int main() {
  n = read();
  for (i = 2; i <= n; ++i) ad(read(), i);
  dfs(1);
  printf("%d\n", f[1]);
  return 0;
}
