#include <bits/stdc++.h>
using namespace std;
void read(int &x) {
  char ch = getchar();
  x = 0;
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + ch - 48, ch = getchar();
}
struct EDGE {
  int next, to;
} edge[200000 + 1];
int head[200000 + 1], fa[200000 + 1];
long long f[200000 + 1], g[200000 + 1];
int n;
int cnt_edge = 0;
void Add(int u, int v) {
  edge[++cnt_edge] = (EDGE){head[u], v}, head[u] = cnt_edge;
}
long long Fast(long long x, int p) {
  long long res = 1;
  while (p) {
    if (p & 1) res = res * x % 998244353;
    x = x * x % 998244353;
    p >>= 1;
  }
  return res;
}
void Dfs(int u) {
  long long s = 1, s1 = 1;
  int v = 0;
  f[u] = g[u] = 1;
  for (int i = head[u]; i; i = edge[i].next) {
    Dfs(edge[i].to);
    v = edge[i].to;
    (s *= (f[v] + g[v])) %= 998244353;
    (s1 *= f[v]) %= 998244353;
  }
  if (!v) return;
  f[u] = g[u] = s;
  for (int i = head[u]; i; i = edge[i].next) {
    (f[u] -= s1 * Fast(f[edge[i].to], 998244353 - 2) % 998244353 *
                 g[edge[i].to] % 998244353 -
             998244353) %= 998244353;
  }
  (g[u] -= s1 - 998244353) %= 998244353;
}
int main() {
  read(n);
  for (int i = 2; i <= n; i++) read(fa[i]), Add(fa[i], i);
  Dfs(1);
  printf("%lld\n", f[1]);
  return 0;
}
