#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
vector<int> adj[maxn];
long long dp[maxn][5];
long long mod = 998244353;
long long pw(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) {
      res = (res * a) % mod;
    }
    a = (a * a) % mod;
    b /= 2;
  }
  return res % mod;
}
void dfs(int v) {
  if (!adj[v].size()) {
    dp[v][2] = 1;
    return;
  }
  dp[v][0] = dp[v][2] = 1;
  for (int u : adj[v]) {
    dfs(u);
    dp[v][0] = dp[v][0] * (dp[u][0] + dp[u][2]) % mod;
    dp[v][2] =
        dp[v][2] * ((dp[u][0] + dp[u][2] + dp[u][1] + dp[u][2]) % mod) % mod;
  }
  for (int u : adj[v]) {
    long long x = dp[v][0];
    x = x * pw((dp[u][0] + dp[u][2]) % mod, mod - 2) % mod;
    dp[v][1] = (dp[v][1] + x * (dp[u][1] + dp[u][2]) % mod) % mod;
  }
  dp[v][2] = 1LL * (dp[v][2] - dp[v][0] - dp[v][1] + mod * 3) % mod;
}
int main() {
  ios::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--;
    adj[p].push_back(i);
  }
  dfs(0);
  cout << (dp[0][0] + dp[0][2]) % mod;
  return 0;
}
