#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10, mod = 998244353;
int dp1[N], dp2[N];
vector<int> g[N];
inline int pw(int x, int y) {
  int ret = 1;
  for (; y; y /= 2) {
    if (y & 1) ret = 1ll * ret * x % mod;
    x = 1ll * x * x % mod;
  }
  return ret;
}
void dfs(int v) {
  int mul = 1, mull = 1;
  for (int u : g[v]) {
    dfs(u);
    mul = 1ll * mul * (dp1[u] + dp2[u]) % mod;
    mull = 1ll * mull * dp1[u] % mod;
  }
  int bad = 0;
  for (int u : g[v]) {
    bad = (bad + 1ll * mull * pw(dp1[u], mod - 2) % mod * dp2[u] % mod) % mod;
  }
  dp1[v] = (mul + mod - bad) % mod;
  dp2[v] = (dp1[v] - mull + mod) % mod;
  for (int u : g[v]) {
    dp2[v] =
        (dp2[v] + 1ll * mull * pw(dp1[u], mod - 2) % mod * dp2[u] % mod) % mod;
  }
  if (g[v].size() == 0) dp1[v] = dp2[v] = 1;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i < n; i++) {
    int p;
    cin >> p;
    p--;
    g[p].push_back(i);
  }
  dfs(0);
  cout << dp1[0];
  return 0;
}
