#include <bits/stdc++.h>
using namespace std;
long long dp[200010][3];
int father[200010];
vector<int> childs[200010];
int in_count[200010];
inline long long ADD(long long A, long long B) { return (A + B) % 998244353LL; }
inline long long MUL(long long A, long long B) { return (A * B) % 998244353LL; }
inline long long SUB(long long A, long long B) {
  return (((A - B) % 998244353LL) + 998244353LL) % 998244353LL;
}
int main() {
  int total;
  cin >> total;
  for (int i = 2; i <= total; i++) {
    cin >> father[i];
    childs[father[i]].push_back(i);
    in_count[father[i]]++;
  }
  queue<int> bfs;
  for (int i = 1; i <= total; i++) {
    if (!childs[i].size()) {
      dp[i][1] = 1;
      in_count[father[i]]--;
    }
  }
  for (int i = 1; i <= total; i++) {
    if ((!in_count[i]) && (childs[i].size())) {
      bfs.push(i);
    }
  }
  while (!bfs.empty()) {
    int node = bfs.front();
    bfs.pop();
    dp[node][0] = 1;
    for (int i = 0; i < childs[node].size(); i++) {
      int child = childs[node][i];
      long long sum_child = ADD(dp[child][1], dp[child][0]);
      long long last_half = ADD(dp[child][1], dp[child][2]);
      dp[node][1] = ADD(MUL(dp[node][1], ADD(sum_child, last_half)),
                        MUL(last_half, dp[node][2]));
      dp[node][2] =
          ADD(MUL(dp[node][2], sum_child), MUL(dp[node][0], last_half));
      dp[node][0] = MUL(sum_child, dp[node][0]);
    }
    in_count[father[node]]--;
    if (!in_count[father[node]]) bfs.push(father[node]);
  }
  cout << ADD(dp[1][1], dp[1][0]) << endl;
}
