#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
using namespace std;
namespace ywy {
inline int get() {
  int n = 0;
  char c;
  while ((c = getchar()) || 23333) {
    if (c >= '0' && c <= '9') break;
    if (c == '-') goto s;
  }
  n = c - '0';
  while ((c = getchar()) || 23333) {
    if (c >= '0' && c <= '9')
      n = n * 10 + c - '0';
    else
      return (n);
  }
s:
  while ((c = getchar()) || 23333) {
    if (c >= '0' && c <= '9')
      n = n * 10 - c + '0';
    else
      return (n);
  }
}
typedef struct _b {
  int dest;
  int nxt;
} bian;
bian memchi[1000001];
int gn = 1, heads[200001];
inline void add(int s, int t) {
  memchi[gn].dest = t;
  memchi[gn].nxt = heads[s];
  heads[s] = gn;
  gn++;
}
long long dp[200001][3];
void dfs(int pt) {
  if (!heads[pt]) {
    dp[pt][1] = 1;
    return;
  }
  long long d0 = 1, d1 = 0, d2 = 0;
  for (register int i = heads[pt]; i; i = memchi[i].nxt) {
    dfs(memchi[i].dest);
    long long n0 =
        (d0 * (dp[memchi[i].dest][0] + dp[memchi[i].dest][1])) % 998244353;
    long long n1 =
        (d0 * ((dp[memchi[i].dest][1] + dp[memchi[i].dest][2]) % 998244353) +
         d1 * ((dp[memchi[i].dest][0] + dp[memchi[i].dest][1]) % 998244353)) %
        998244353;
    long long n2 =
        (d1 * ((dp[memchi[i].dest][1] + dp[memchi[i].dest][2]) % 998244353) +
         d2 * ((dp[memchi[i].dest][0] + 2 * dp[memchi[i].dest][1] +
                dp[memchi[i].dest][2]) %
               998244353)) %
        998244353;
    d0 = n0;
    d1 = n1;
    d2 = n2;
  }
  dp[pt][0] = d0;
  dp[pt][1] = d2;
  dp[pt][2] = d1;
}
void ywymain() {
  int n = get();
  for (register int i = 2; i <= n; i++) add(get(), i);
  dfs(1);
  cout << (dp[1][1] + dp[1][0]) % 998244353 << endl;
}
}  // namespace ywy
int main() {
  ywy::ywymain();
  return (0);
}
