#include <bits/stdc++.h>
using namespace std;
const int maxn = 200010, mod = 998244353;
int n, head[maxn], to[maxn], nextt[maxn], tot = 1, f[maxn][2], g[maxn][3];
void add(int x, int y) {
  to[tot] = y;
  nextt[tot] = head[x];
  head[x] = tot++;
}
void dfs(int u) {
  if (!head[u]) {
    f[u][0] = f[u][1] = 1;
    return;
  }
  for (int i = head[u]; i; i = nextt[i]) {
    int v = to[i];
    dfs(v);
  }
  g[u][0] = 1;
  for (int i = head[u]; i; i = nextt[i]) {
    int v = to[i];
    g[u][2] = 1LL * g[u][2] * (f[v][0] + f[v][1]) % mod;
    g[u][2] = (g[u][2] + 1LL * g[u][1] * f[v][1] % mod) % mod;
    g[u][1] = 1LL * g[u][1] * f[v][0] % mod;
    g[u][1] = (g[u][1] + 1LL * g[u][0] * f[v][1] % mod) % mod;
    g[u][0] = 1LL * g[u][0] * f[v][0] % mod;
  }
  f[u][0] = (g[u][0] + g[u][2]) % mod;
  f[u][1] = (g[u][1] + g[u][2]) % mod;
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) {
    int x;
    scanf("%d", &x);
    add(x, i);
  }
  dfs(1);
  printf("%d\n", f[1][0]);
  return 0;
}
