#include <bits/stdc++.h>
using namespace std;
vector<int> adj[200005];
int dp[200005][2];
int add(int x, int y) { return ((x + y) % 998244353 + 998244353) % 998244353; }
int mul(int x, int y) { return (long long)x * y % 998244353; }
int mypow(int x, int c) {
  int ret = 1;
  while (c > 0) {
    if (c & 1) {
      ret = mul(ret, x);
    }
    c /= 2;
    x = mul(x, x);
  }
  return ret;
}
void dfs(int node) {
  bool isLeaf = true;
  for (int ch : adj[node]) {
    isLeaf = false;
    dfs(ch);
  }
  if (isLeaf) {
    dp[node][0] = dp[node][1] = 1;
    return;
  }
  int all = 1, bitZero = 1;
  int numZero = 0;
  for (int ch : adj[node]) {
    all = mul(all, add(dp[ch][0], dp[ch][1]));
    if (dp[ch][0] != 0) {
      bitZero = mul(bitZero, dp[ch][0]);
    } else {
      ++numZero;
    }
  }
  int tmp = bitZero;
  if (numZero) {
    tmp = 0;
  }
  all = add(all, -tmp);
  dp[node][1] = all;
  int sum = 0;
  for (int ch : adj[node]) {
    int cur = bitZero;
    int num = numZero;
    if (dp[ch][0] == 0) {
      num--;
    } else {
      cur = mul(cur, mypow(dp[ch][0], 998244353 - 2));
    }
    int ctmp = cur;
    if (num) {
      ctmp = 0;
    }
    ctmp = mul(ctmp, dp[ch][1]);
    sum = add(sum, ctmp);
  }
  dp[node][0] = add(tmp, add(dp[node][1], -sum));
}
void solve() {
  int n;
  scanf("%d ", &n);
  for (int i = 2; i <= n; ++i) {
    int p;
    scanf("%d ", &p);
    adj[p].push_back(i);
  }
  dfs(1);
  int ret = dp[1][0];
  printf("%d\n", ret);
}
int main() {
  solve();
  return 0;
}
