#include <bits/stdc++.h>
using namespace std;
int n, x;
int dp[200005][2];
vector<int> v[200005];
int mul(int x, int y) { return (long long)x * y % 998244353; }
int add(int x, int y) {
  x += y;
  if (x >= 998244353) x -= 998244353;
  if (x < 0) x += 998244353;
  return x;
}
void dfs(int node) {
  if (!((int)v[node].size())) {
    dp[node][0] = dp[node][1] = 1;
    return;
  }
  int alle = 1;
  int dc0 = 1;
  vector<int> pre, suf;
  pre.push_back(1);
  for (int i : v[node]) {
    dfs(i);
    alle = mul(alle, add(dp[i][0], dp[i][1]));
    dc0 = mul(dc0, dp[i][0]);
    pre.push_back(dp[i][0]);
    suf.push_back(dp[i][0]);
  }
  suf.push_back(1);
  dp[node][1] = add(alle, -dc0);
  dp[node][0] = alle;
  for (int i = 1; i < ((int)pre.size()); i++) pre[i] = mul(pre[i - 1], pre[i]);
  for (int i = ((int)suf.size()) - 2; i >= 0; i--)
    suf[i] = mul(suf[i + 1], suf[i]);
  for (int i = 0; i < ((int)v[node].size()); i++) {
    dp[node][0] =
        add(dp[node][0], -mul(mul(pre[i], suf[i + 1]), dp[v[node][i]][1]));
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) {
    int x;
    scanf("%d", &x);
    v[x].push_back(i);
  }
  dfs(1);
  printf("%d", dp[1][0]);
}
