#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
const int MOD = 998244353;
vector<int> G[N];
long long dp[N][3];
void dfs(int u) {
  long long &x = dp[u][0], &y = dp[u][1], &z = dp[u][2];
  x = y = 1;
  int f = 0;
  for (int v : G[u]) {
    dfs(v);
    long long a = dp[v][0], b = dp[v][1], c = dp[v][2];
    if (f > 0) {
      z = ((a + c) * z + b * (y + z)) % MOD;
      y = (y * (a + c) + x * b) % MOD;
    } else {
      y = b;
    }
    x = x * (a + c) % MOD;
    f = 1;
  }
  y = (y + z) % MOD;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 2, u; i <= n; i++) {
    cin >> u;
    G[u].push_back(i);
  }
  dfs(1);
  cout << (dp[1][0] + dp[1][2]) % MOD << endl;
  return 0;
}
