#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("unswitch-loops")
#pragma GCC optimize("fast-math")
#pragma GCC optimize("section-anchors")
#pragma GCC optimize("profile-reorder-functions")
#pragma GCC optimize("profile-values")
#pragma GCC optimize("tracer")
#pragma GCC optimize("vpt")
#pragma GCC target("sse2")
#pragma GCC target("sse3")
#pragma GCC target("ssse3")
#pragma GCC target("sse4.1")
#pragma GCC target("sse4.2")
#pragma GCC target("avx")
#pragma GCC target("avx2")
#pragma GCC target("popcnt")
#pragma GCC target("abm")
#pragma GCC target("mmx")
#pragma GCC target("tune=native")
using namespace std;
const long long N = 2e5 + 7;
const long long MOD = 998244353;
long long mod(long long n) {
  if (n < 0) {
    return n % MOD + MOD;
  } else {
    if (n < MOD)
      return n;
    else if (n < 2 * MOD)
      return n - MOD;
    else
      return n % MOD;
  }
}
void add(long long &a, long long b) { a = mod(a + b); }
vector<long long> g[N];
long long ans[N], sum[N], good[N];
long long _ans[3], __ans[3];
long long _sum[3], __sum[3];
void dfs(long long u) {
  if (g[u].empty()) {
    ans[u] = sum[u] = good[u] = 1;
    return;
  }
  for (long long v : g[u]) {
    dfs(v);
  }
  for (long long i = 0; i < 3; ++i) _ans[i] = _sum[i] = 0;
  _ans[0] = 1;
  for (long long v : g[u]) {
    for (long long i = 0; i < 3; ++i) __sum[i] = 0;
    for (long long i = 0; i < 3; ++i) {
      add(__sum[i], _sum[i] * ans[v] + sum[v] * _ans[i]);
      if (i == 0) {
        add(__sum[min(2ll, i + 1)], _sum[i] * good[v] + sum[v] * _ans[i]);
      } else {
        add(__sum[min(2ll, i + 1)],
            _sum[i] * good[v] + sum[v] * _ans[i] - good[v] * _ans[i]);
      }
    }
    for (long long i = 0; i < 3; ++i) _sum[i] = __sum[i];
    for (long long i = 0; i < 3; ++i) __ans[i] = 0;
    for (long long i = 0; i < 3; ++i) {
      add(__ans[i], _ans[i] * ans[v]);
      add(__ans[min(2ll, i + 1)], _ans[i] * good[v]);
    }
    for (long long i = 0; i < 3; ++i) _ans[i] = __ans[i];
  }
  ans[u] = mod(_ans[0] + _ans[2]);
  sum[u] = mod(_sum[0] + _sum[2]);
  good[u] = _ans[2];
  long long add = 0;
  long long cnt = 1;
  for (long long v : g[u]) {
    add = mod(add * ans[v] + good[v] * cnt);
    cnt = mod(cnt * ans[v]);
  }
  good[u] = mod(good[u] + add);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  for (long long i = 2; i <= n; ++i) {
    long long p;
    cin >> p;
    g[p].push_back(i);
  }
  dfs(1);
  cout << ans[1] << '\n';
}
