#include <bits/stdc++.h>
inline int gi() {
  char c;
  int x = 0;
  for (; c < '0' || c > '9'; c = getchar())
    ;
  for (; c >= '0' && c <= '9'; c = getchar()) x = (x << 1) + (x << 3) + c - '0';
  return x;
}
const int N = 200005, Mod = 998244353;
int f[N][3], head[N], nxt[N], to[N], n;
void addedge(int u, int v, int now) {
  nxt[now] = head[u], head[u] = now, to[now] = v;
}
void dfs(int u) {
  if (!head[u])
    f[u][2] = 1;
  else
    f[u][0] = 1;
  for (int e = head[u]; e; e = nxt[e]) {
    int& v = to[e];
    dfs(v);
    int x = (f[v][0] + f[v][2]) % Mod, y = (f[v][1] + f[v][2]) % Mod;
    int f0 = (1ll * f[u][0] * x % Mod);
    int f1 = ((1ll * f[u][0] * y % Mod) + (1ll * f[u][1] * x % Mod)) % Mod;
    int f2 =
        ((1ll * f[u][1] * y % Mod) + (1ll * f[u][2] * (x + y) % Mod % Mod)) %
        Mod;
    f[u][0] = f0, f[u][1] = f1, f[u][2] = f2;
  }
}
int main() {
  n = gi();
  for (int i = 2; i <= n; ++i) addedge(gi(), i, i - 1);
  dfs(1);
  printf("%d", (f[1][0] + f[1][2]) % Mod);
}
