#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
const int M = 998244353;
template <class T>
inline T read(T &x) {
  int f = 1;
  char ch = getchar();
  x = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x *= f;
}
int n;
struct Edge {
  int s, next;
} e[N];
int last[N], k = 0;
void AddEdge(int x, int y) {
  e[++k] = {y, last[x]};
  last[x] = k;
}
long long Pow(long long x, long long y) {
  long long z = 1;
  while (y) {
    if (y & 1) (z *= x) %= M;
    y /= 2, (x *= x) %= M;
  }
  return z;
}
long long f[N], g[N];
void DFS(int x) {
  if (last[x]) {
    long long m = 1, mf = 1;
    for (int i = last[x], s; i; i = e[i].next) {
      s = e[i].s;
      DFS(s);
      (m *= (f[s] + g[s]) % M) %= M;
      (mf *= f[s]) %= M;
    }
    for (int i = last[x], s; i; i = e[i].next) {
      s = e[i].s;
      (f[x] += mf * Pow(f[s], M - 2) % M * g[s] % M) %= M;
    }
    f[x] = (m + M - f[x]) % M;
    g[x] = (m + M - mf) % M;
  } else {
    f[x] = g[x] = 1;
  }
}
int main() {
  read(n);
  for (int(i) = (2); (i) <= (n); (i)++) {
    int x;
    read(x);
    AddEdge(x, i);
  }
  DFS(1);
  printf("%lld\n", f[1]);
  return 0;
}
