#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
const long long mxn = 2e5 + 10, md = 998244353;
long long n, k, q;
long long dp[mxn][3];
vector<long long> G[mxn];
long long tav(long long a, long long b) {
  if (b == 0) {
    return 1;
  }
  long long x = tav(a, b / 2);
  x *= x;
  x %= md;
  if (b % 2 == 1) {
    return x * a % md;
  }
  return x;
}
void DFS(int v) {
  if (int(G[v].size()) == 0) {
    dp[v][2] = 1;
    dp[v][1] = dp[v][0] = 0;
    return;
  }
  for (auto u : G[v]) {
    DFS(u);
    dp[v][0] *= (dp[u][2] + dp[u][0]), dp[v][0] %= md;
  }
  for (auto u : G[v]) {
    dp[v][1] += (dp[v][0] * tav((dp[u][0] + dp[u][2]) % md, md - 2) % md *
                 dp[u][1] % md),
        dp[v][1] %= md;
    dp[v][1] += (dp[v][0] * tav((dp[u][0] + dp[u][2]) % md, md - 2) % md *
                 dp[u][2] % md),
        dp[v][1] %= md;
    dp[v][2] *= ((dp[u][0] + dp[u][1] + 2 * dp[u][2]) % md), dp[v][2] %= md;
  }
  dp[v][2] = (dp[v][2] - dp[v][1]) + md;
  dp[v][2] %= md;
  dp[v][2] = (dp[v][2] - dp[v][0]) + md;
  dp[v][2] %= md;
}
void input() {
  cin >> n;
  for (int i = 2; i <= n; i++) {
    cin >> q;
    G[q].push_back(i);
  }
}
void solve() {
  for (int i = 0; i <= n; i++) {
    dp[i][0] = dp[i][2] = 1;
  }
  DFS(1);
  cout << (((dp[1][0] + dp[1][2]) % md) + md) % md << endl;
}
int main() {
  ios::sync_with_stdio(false);
  input(), solve();
  return 0;
}
