#include <bits/stdc++.h>
using namespace std;
vector<int> g[200002];
int n;
long long dp[200002][2], p;
const long long mod = 998244353;
void dfs(int v) {
  if (g[v].size() == 0) {
    dp[v][0] = dp[v][1] = 1;
    return;
  }
  if (g[v].size() == 1) {
    int u = g[v][0];
    dfs(u);
    dp[v][0] = dp[u][0];
    dp[v][1] = dp[u][1];
    return;
  }
  long long a = 1, b = 0, c = 0;
  for (auto to : g[v]) {
    dfs(to);
    c = (b + c) * dp[to][1] + c * dp[to][0];
    b = a * dp[to][1] + b * dp[to][0];
    a = a * dp[to][0];
    a %= mod;
    b %= mod;
    c %= mod;
  }
  dp[v][0] = (a + c) % mod;
  dp[v][1] = (b + c) % mod;
}
int main() {
  cin >> n;
  for (int i = 2; i <= n; i++) {
    cin >> p;
    g[p].push_back(i);
  }
  dfs(1);
  cout << dp[1][0] << endl;
  return 0;
}
