#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int n, mod = 998244353;
int64_t f[N], g[N], pre[N], suf[N];
vector<int> ke[N];
void dfs(int u) {
  if (ke[u].size() == 0) {
    f[u] = g[u] = 1;
    return;
  }
  int m = ke[u].size();
  for (int v : ke[u]) dfs(v);
  pre[0] = suf[m + 1] = 1;
  for (int i = 1, j = m; i <= m; ++i, --j) {
    pre[i] = pre[i - 1] * f[ke[u][i - 1]] % mod;
    suf[j] = suf[j + 1] * f[ke[u][j - 1]] % mod;
  }
  int64_t sum = 1, tmp;
  for (int i = 1, v; i <= m; ++i) {
    v = ke[u][i - 1];
    tmp = suf[i + 1] * g[v] % mod;
    g[u] = (g[u] + tmp * sum % mod) % mod;
    f[u] = (f[u] + tmp * (sum - pre[i - 1]) % mod) % mod;
    sum = sum * (f[v] + g[v]) % mod;
  }
  f[u] = (f[u] + pre[m]) % mod;
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; ++i) {
    int p;
    scanf("%d", &p);
    ke[p].push_back(i);
  }
  dfs(1);
  cout << (f[1] + mod) % mod;
}
