#include <bits/stdc++.h>
int f[201000], g[201000];
int h[201000], nxt[2 * 201000], to[2 * 201000], K = 0;
void ins(int u, int v) {
  nxt[++K] = h[u];
  h[u] = K;
  to[K] = v;
}
int qpow(int x, int p) {
  int ans = 1;
  while (p) {
    if (p & 1) ans = 1ll * ans * x % 998244353;
    x = 1ll * x * x % 998244353;
    p >>= 1;
  }
  return ans;
}
void dfs(int x) {
  bool ok = 0;
  f[x] = g[x] = 1;
  int G = 0;
  for (int i = h[x]; i; i = nxt[i]) {
    ok = 1;
    dfs(to[i]);
    f[x] = 1ll * f[x] * (f[to[i]] + g[to[i]]) % 998244353;
    g[x] = 1ll * g[x] * f[to[i]] % 998244353;
  }
  for (int i = h[x]; i; i = nxt[i])
    G = (G +
         1ll * g[x] * qpow(f[to[i]], 998244353 - 2) % 998244353 * g[to[i]]) %
        998244353;
  if (ok)
    g[x] = (f[x] - g[x] + 998244353) % 998244353,
    f[x] = (f[x] - G + 998244353) % 998244353;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) {
    int p;
    scanf("%d", &p);
    ins(p, i);
  }
  dfs(1);
  printf("%d\n", f[1]);
}
