#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  return x * f;
}
const int MAXN = 200010;
const int INF = 2147483600;
const long long Mod = 998244353LL;
int N;
vector<int> vec[MAXN + 1];
long long f[MAXN + 1][3];
inline long long Pow(long long a, long long b) {
  long long ret = 1;
  for (; b; b >>= 1, a = a * a % Mod)
    if (b & 1) ret = ret * a % Mod;
  return ret;
}
inline void Add(long long &a, long long b) {
  a = (a + b >= Mod ? a + b - Mod : a + b);
}
inline void dfs(int k) {
  if (!vec[k].size()) {
    f[k][0] = 0;
    f[k][1] = 1;
    f[k][2] = 0;
    return;
  }
  long long prod = 1;
  f[k][0] = 1, f[k][1] = 1, f[k][2] = 0;
  for (int i = 0, sz = vec[k].size(); i < sz; i++) {
    int v = vec[k][i];
    dfs(v);
    long long f2 = f[k][2];
    f[k][0] = f[k][0] * (f[v][0] + f[v][1]) % Mod;
    f[k][1] = f[k][1] * (f[v][1] * 2 + f[v][2] + f[v][0]) % Mod;
    f[k][2] =
        (f2 * (f[v][1] + f[v][0]) % Mod + prod * (f[v][2] + f[v][1]) % Mod) %
        Mod;
    prod = prod * (f[v][1] + f[v][0]) % Mod;
  }
  Add(f[k][1], Mod - f[k][2]);
  Add(f[k][1], Mod - prod);
}
int main() {
  N = read();
  for (int i = 2; i <= N; i++) {
    int x = read();
    vec[x].push_back(i);
  }
  dfs(1);
  printf("%lld\n", (f[1][0] + f[1][1]) % Mod);
  return 0;
}
