#include <bits/stdc++.h>
using namespace std;
int head[200010], to[200010 << 1], nxt[200010 << 1], tot;
int f[200010], g[200010];
const int mod = 998244353;
char *p1, *p2, buf[100000];
int rd() {
  int x = 0, f = 1;
  char c =
      (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
           ? EOF
           : *p1++);
  while (c < 48) {
    if (c == '-') f = -1;
    c = (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++);
  }
  while (c > 47) {
    x = (((x << 2) + x) << 1) + (c ^ 48),
    c = (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++);
  }
  return x * f;
}
inline void add(int x, int y) {
  to[++tot] = y;
  nxt[tot] = head[x];
  head[x] = tot;
}
int qpow(int x, int y) {
  int ans = 1;
  while (y) {
    if (y & 1) {
      ans = (long long)ans * x % mod;
    }
    y >>= 1;
    x = (long long)x * x % mod;
  }
  return ans;
}
int sz[200010];
void dfs(int p, int fa) {
  int sum = 1;
  sz[p] = 1;
  f[p] = g[p] = 1;
  for (int i = head[p]; i; i = nxt[i]) {
    if (to[i] != fa) {
      dfs(to[i], p);
      sz[p] += sz[to[i]];
      sum = (long long)sum * f[to[i]] % mod;
      f[p] = (long long)f[p] * ((f[to[i]] + g[to[i]]) % mod) % mod;
      g[p] = f[p];
    }
  }
  if (sz[p] > 1) {
    (g[p] += mod - sum) %= mod;
    for (int i = head[p]; i; i = nxt[i]) {
      if (to[i] != fa) {
        int mdl = (long long)qpow(f[to[i]], mod - 2) * g[to[i]] % mod;
        mdl = (long long)mdl * sum % mod;
        (f[p] += mod - mdl) %= mod;
      }
    }
  }
}
int main() {
  int n = rd();
  for (int i = 2; i <= n; i++) {
    int x = rd();
    add(i, x), add(x, i);
  }
  dfs(1, 1);
  cout << f[1] << endl;
  return 0;
}
