#include <bits/stdc++.h>
using namespace std;
int n;
int f[200005][3];
vector<int> tree[200005];
void dfs(int node) {
  if (tree[node].size() == 0) {
    f[node][2] = 1;
    return;
  }
  int f_total = 1;
  f[node][0] = 1;
  for (int i = 0; i < tree[node].size(); i++) {
    int child = tree[node][i];
    dfs(child);
    f_total = (((long long)(f_total) *
                (long long)((f[child][0] + f[child][2]) % 998244353 +
                            (f[child][1] + f[child][2]) % 998244353)) %
               998244353);
    f[node][0] =
        (((long long)(f[node][0]) * (long long)(f[child][0] + f[child][2])) %
         998244353);
  }
  vector<int> pprod(tree[node].size()), sprod(tree[node].size());
  int tmp = 1;
  for (int i = 0; i < tree[node].size(); i++) {
    int child = tree[node][i];
    pprod[i] = tmp;
    tmp = (((long long)(tmp) * (long long)(f[child][0] + f[child][2])) %
           998244353);
  }
  tmp = 1;
  for (int i = (int)(tree[node].size()) - 1; i >= 0; i--) {
    int child = tree[node][i];
    sprod[i] = tmp;
    tmp = (((long long)(tmp) * (long long)(f[child][0] + f[child][2])) %
           998244353);
  }
  for (int i = 0; i < tree[node].size(); i++) {
    int child = tree[node][i];
    (f[node][1]) +=
        ((((long long)(f[child][1] + f[child][2]) *
           (long long)((((long long)(pprod[i]) * (long long)(sprod[i])) %
                        998244353))) %
          998244353));
    if ((f[node][1]) >= 998244353) (f[node][1]) -= 998244353;
  }
  f[node][2] = f_total;
  (f[node][2]) -= (f[node][0]);
  if ((f[node][2]) < 0) (f[node][2]) += 998244353;
  (f[node][2]) -= (f[node][1]);
  if ((f[node][2]) < 0) (f[node][2]) += 998244353;
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) {
    int p;
    scanf("%d", &p);
    tree[p].push_back(i);
  }
  dfs(1);
  printf("%d", (f[1][0] + f[1][2]) % 998244353);
  return 0;
}
