#include <bits/stdc++.h>
using namespace std;
long long a[200005];
const long long mod = 998244353;
vector<vector<int>> g;
long long pow(long long x, long long d) {
  long long ret = 1;
  while (d) {
    if (d & 1) {
      ret = (ret * x) % mod;
    }
    x = (x * x) % mod;
    d >>= 1;
  }
  return ret;
}
pair<long long, long long> DFS(int v) {
  if (g[v].size() == 0) {
    return pair<long long, long long>(1, 1);
  }
  std::vector<pair<long long, long long>> vvv;
  long long total = 1, non_incl = 1, only_one = 0;
  for (int i = 0; i < g[v].size(); ++i) {
    auto vert = DFS(g[v][i]);
    vvv.push_back(vert);
    total = total * (vert.first + vert.second) % mod;
    non_incl = (non_incl * vert.first) % mod;
  }
  for (int i = 0; i < vvv.size(); ++i) {
    only_one = (only_one +
                non_incl * pow(vvv[i].first, mod - 2) % mod * vvv[i].second) %
               mod;
  }
  total = (total + mod - only_one) % mod;
  long long incl = (total + mod - non_incl + only_one) % mod;
  return pair<long long, long long>(total, incl);
}
int main() {
  int n;
  cin >> n;
  g.resize(n);
  for (int i = 0; i + 1 < n; ++i) {
    int v;
    cin >> v;
    g[v - 1].push_back(i + 1);
  }
  long long ans = DFS(0).first;
  cout << ans << endl;
  return 0;
}
