#include <bits/stdc++.h>
using namespace std;
template <class T>
using v2d = vector<vector<T> >;
template <class T>
bool uin(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
mt19937 rng(chrono::system_clock::now().time_since_epoch().count());
const int maxN = 2e5 + 10;
const long long mod = 998244353;
int n;
vector<int> adj[maxN];
long long f[maxN], g[maxN], h[maxN], ans;
void dfs(int u) {
  bool leaf = 1;
  for (auto &v : adj[u]) {
    leaf = 0;
    dfs(v);
  }
  if (leaf) {
    f[u] = g[u] = 1;
    h[u] = 0;
    return;
  }
  long long x = 1, y = 0, z = 1;
  for (auto &v : adj[u]) {
    x = x * ((f[v] + g[v] + h[v]) % mod) % mod;
    z = z * ((f[v] + h[v]) % mod) % mod;
  }
  int sz = (int)adj[u].size();
  vector<long long> prefix(sz);
  for (int i = 0; i < (int)(sz); ++i) {
    int v = adj[u][i];
    if (i == 0) {
      prefix[i] = (f[v] + h[v]) % mod;
    } else {
      prefix[i] = prefix[i - 1] * ((f[v] + h[v]) % mod) % mod;
    }
  }
  long long cur = 1;
  for (int i = (int)(sz)-1; i >= 0; --i) {
    int v = adj[u][i];
    y = (y + cur * g[v] % mod * (i == 0 ? 1LL : prefix[i - 1]) % mod) % mod;
    cur = cur * ((f[v] + h[v]) % mod) % mod;
  }
  f[u] = ((x - y - z) % mod + mod) % mod;
  g[u] = (x - z + mod) % mod;
  h[u] = z;
}
void solve() {
  cin >> n;
  for (int i = (int)(2); i <= (int)(n); ++i) {
    int p;
    cin >> p;
    adj[p].emplace_back(i);
  }
  dfs(1);
  ans = (f[1] + h[1]) % mod;
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
