#include <bits/stdc++.h>
using namespace std;
const int N_MAX = 200000, mod = 998244353;
int n;
vector<int> child[N_MAX];
long long a[N_MAX], b[N_MAX], c[N_MAX];
void dp(int r) {
  if (child[r].empty()) {
    a[r] = 1;
    b[r] = 0;
    c[r] = 0;
    return;
  }
  dp(child[r][0]);
  a[r] = 0;
  b[r] = (a[child[r][0]] + b[child[r][0]]) % mod;
  c[r] = (a[child[r][0]] + c[child[r][0]]) % mod;
  for (int i = 1; i < child[r].size(); i++) {
    int x = child[r][i];
    dp(x);
    long long ar = a[r], br = b[r], cr = c[r];
    a[r] = (ar * (a[x] + b[x]) + (ar + cr) * (a[x] + c[x])) % mod;
    b[r] = br * (a[x] + b[x]) % mod;
    c[r] = (cr * (a[x] + b[x]) + br * (a[x] + c[x])) % mod;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i < n; i++) {
    int p;
    cin >> p;
    child[p - 1].push_back(i);
  }
  dp(0);
  cout << (a[0] + b[0]) % mod << endl;
  return 0;
}
