#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
long long add(long long a, long long b) {
  a += b;
  if (a < 0) {
    a += MOD;
  }
  if (a >= MOD) {
    a -= MOD;
  }
  return a;
}
long long sub(long long a, long long b) {
  a -= b;
  if (a < 0) a += MOD;
  return a;
}
long long mult(long long a, long long b) { return (a * b) % MOD; }
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = mult(res, x);
    y = y >> 1;
    x = mult(x, x);
  }
  return res;
}
long long modInverse(long long a) { return power(a, MOD - 2); }
const long long mxN = 200000;
vector<long long> adj[mxN];
long long dp[mxN][3];
void dfs(long long v, long long p) {
  if (adj[v].size() == 1 && p != -1) {
    dp[v][2] = 1;
    return;
  }
  vector<long long> cs;
  for (long long i : adj[v]) {
    if (i == p) continue;
    dfs(i, v);
    cs.push_back(i);
  }
  dp[v][0] = 1;
  for (long long i : cs) {
    dp[v][0] = mult(dp[v][0], add(dp[i][2], dp[i][0]));
  }
  long long tot = 1;
  for (long long i : cs) {
    tot = mult(tot, add(add(dp[i][0], dp[i][2]), add(dp[i][1], dp[i][2])));
    dp[v][1] =
        add(dp[v][1], mult(mult(dp[v][0], modInverse(add(dp[i][0], dp[i][2]))),
                           add(dp[i][1], dp[i][2])));
  }
  dp[v][2] = sub(tot, add(dp[v][0], dp[v][1]));
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  for (long long i = 1; i < n; ++i) {
    long long p;
    cin >> p;
    --p;
    adj[p].push_back(i);
    adj[i].push_back(p);
  }
  dfs(0, -1);
  cout << add(dp[0][0], dp[0][2]) << "\n";
}
