#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("O0")
#pragma GCC optimize("O1")
const int MAXN = 2e5 + 25, mod = 998244353;
long long pw(long long a, long long b) {
  long long ret = 1;
  long long mul = a;
  while (b > 0) {
    if (b & 1) ret = (1ll * ret * mul) % mod;
    mul = (1ll * mul * mul) % mod;
    b /= 2;
  }
  return ret;
}
int n, dp[2][MAXN];
vector<int> adj[MAXN];
void dfs(int v) {
  if (!adj[v].size()) {
    dp[0][v] = dp[1][v] = 1;
    return;
  }
  int mt = 1, m0 = 1;
  for (int(i) = (0); (i) < (adj[v].size()); (i)++) {
    int u = adj[v][i];
    dfs(u);
    mt = (1ll * mt * (dp[0][u] + dp[1][u])) % mod;
    m0 = (1ll * m0 * dp[0][u]) % mod;
  }
  dp[1][v] = (mt - m0 + mod) % mod, dp[0][v] = mt;
  for (int(i) = (0); (i) < (adj[v].size()); (i)++) {
    int u = adj[v][i];
    dp[0][v] -= (((1ll * m0 * pw(dp[0][u], mod - 2)) % mod) * dp[1][u]) % mod;
    if (dp[0][v] < 0) dp[0][v] += mod;
  }
}
int main() {
  cin >> n;
  for (int(i) = (1); (i) < (n); (i)++) {
    int p;
    cin >> p;
    p--;
    adj[p].push_back(i);
  }
  dfs(0);
  cout << (dp[0][0] + dp[2][0]) % mod;
}
