#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const pair<T, U> &_p) {
  _out << _p.first << ' ' << _p.second;
  return _out;
}
template <typename T, typename U>
inline istream &operator>>(istream &_in, pair<T, U> &_p) {
  _in >> _p.first >> _p.second;
  return _in;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const vector<T> &_v) {
  if (_v.empty()) {
    return _out;
  }
  _out << _v.front();
  for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) {
    _out << ' ' << *_it;
  }
  return _out;
}
template <typename T>
inline istream &operator>>(istream &_in, vector<T> &_v) {
  for (auto &_i : _v) {
    _in >> _i;
  }
  return _in;
}
const long long MAXN = 2e5;
const long long INF = 1e9;
const long long MOD = 998244353;
long long sum(long long a, long long b) {
  if (a + b >= MOD) {
    return a + b - MOD;
  }
  return a + b;
}
long long mul(long long a, long long b) {
  if (a * b >= MOD) {
    return (a * b) % MOD;
  }
  return a * b;
}
long long sqr(long long a) { return (a * a) % MOD; }
long long bin_pow(long long a, long long b) {
  if (b == 0) {
    return 1;
  }
  if (b % 2) {
    return mul(a, bin_pow(a, b - 1));
  }
  return sqr(bin_pow(a, b / 2));
}
vector<long long> g[MAXN];
class FLeafPartition {
 public:
  void solve(std::istream &in, std::ostream &out) {
    long long n;
    in >> n;
    vector<long long> p(n - 1);
    for (long long i = 0; i < n - 1; i++) {
      in >> p[i];
      p[i]--;
      g[p[i]].push_back(i + 1);
    }
    vector<vector<long long>> dp(n, vector<long long>(3));
    for (long long i = n - 1; i >= 0; i--) {
      if (((long long)g[i].size()) > 0) {
        dp[i][2] = 1;
        for (auto v : g[i]) {
          dp[i][0] = sum(mul(sum(dp[i][0], dp[i][1]), sum(dp[v][0], dp[v][1])),
                         mul(dp[i][0], sum(dp[v][0], dp[v][2])));
          dp[i][1] = sum(mul(dp[i][2], sum(dp[v][0], dp[v][1])),
                         mul(dp[i][1], sum(dp[v][0], dp[v][2])));
          dp[i][2] = mul(dp[i][2], sum(dp[v][0], dp[v][2]));
        }
      } else
        dp[i][0] = 1;
    }
    out << sum(dp[0][0], dp[0][2]);
  }
};
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  FLeafPartition solver;
  std::istream &in(std::cin);
  std::ostream &out(std::cout);
  solver.solve(in, out);
  return 0;
}
