#include <bits/stdc++.h>
using namespace std;
int n;
long long dp[200005][3], l[200005], r[200005];
vector<int> v[200005];
int ta;
void dfs(int a) {
  dp[a][0] = 1;
  if (!v[a].empty()) {
    long long tmp = 0;
    dp[a][1] = 1;
    for (int i : v[a]) {
      dfs(i);
      dp[a][0] = dp[a][0] *
                 (((dp[i][0] * 2 + dp[i][1] + dp[i][2])) % 998244353) %
                 998244353;
      dp[a][1] = dp[a][1] * (dp[i][0] + dp[i][1]) % 998244353;
    }
    l[0] = 1;
    for (int j = 0; j < v[a].size(); j++)
      l[j + 1] = l[j] * (dp[v[a][j]][0] + dp[v[a][j]][1]) % 998244353;
    r[v[a].size()] = 1;
    for (int j = v[a].size() - 1; j >= 0; j--)
      r[j] = r[j + 1] * (dp[v[a][j]][0] + dp[v[a][j]][1]) % 998244353;
    dp[a][0] = (dp[a][0] + 998244353 - dp[a][1]) % 998244353;
    for (int j = 0; j < v[a].size(); j++) {
      dp[a][0] = (dp[a][0] + 998244353 -
                  l[j] * r[j + 1] % 998244353 *
                      (dp[v[a][j]][0] + dp[v[a][j]][2]) % 998244353) %
                 998244353;
      dp[a][2] =
          (dp[a][2] + l[j] * r[j + 1] % 998244353 *
                          (dp[v[a][j]][0] + dp[v[a][j]][2]) % 998244353) %
          998244353;
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) {
    scanf("%d", &ta);
    v[ta].push_back(i);
  }
  dfs(1);
  printf("%lld\n", (dp[1][0] + dp[1][1]) % 998244353);
}
