#include <bits/stdc++.h>
using namespace std;
const int p = 998244353;
int head[200005], to[200005], nxt[200005], cnt = 0;
inline void addedge(int x, int y) {
  to[++cnt] = y, nxt[cnt] = head[x], head[x] = cnt;
}
int f[200005][3];
inline void dfs(int x) {
  if (!head[x])
    f[x][2] = 1;
  else
    f[x][0] = 1;
  for (int i = head[x]; i; i = nxt[i]) {
    int y = to[i];
    dfs(y);
    int fx0 = f[x][0], fx1 = f[x][1], fx2 = f[x][2], wx = f[y][0] + f[y][2],
        wy = f[y][1] + f[y][2];
    f[x][0] = (long long)fx0 * wx % p;
    f[x][1] = ((long long)fx0 * wy + (long long)fx1 * wx) % p;
    f[x][2] = ((long long)fx1 * wy + (long long)fx2 * ((long long)wx + wy)) % p;
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 2; i <= n; i++) {
    int fa;
    cin >> fa;
    addedge(fa, i);
  }
  dfs(1);
  cout << (f[1][0] + f[1][2]) % p;
  return 0;
}
