#include <bits/stdc++.h>
using namespace std;
inline void open(const char *s) {}
inline int rd() {
  static int x, f;
  x = 0;
  f = 1;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') f = -1;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return f > 0 ? x : -x;
}
const int N = 200010, mod = 998244353;
int n, fa[N], f[N][3];
bool isnl[N];
inline int pls(int a, int b) { return a + b >= mod ? a + b - mod : a + b; }
inline int mul(int a, int b) { return (long long)a * b % mod; }
int main() {
  n = rd();
  for (int i = 1; i <= n; i++) f[i][2] = 1;
  for (int i = 2; i <= n; i++) {
    int x = rd();
    fa[i] = x;
    if (!isnl[x]) swap(f[fa[i]][2], f[fa[i]][0]);
    isnl[x] = 1;
  }
  for (int v = n; v >= 2; v--) {
    int u = fa[v];
    f[u][2] = pls(mul(f[u][2], pls(mul(2, f[v][2]), pls(f[v][0], f[v][1]))),
                  mul(f[u][1], pls(f[v][2], f[v][1])));
    f[u][1] = pls(mul(f[u][1], pls(f[v][2], f[v][0])),
                  mul(f[u][0], pls(f[v][1], f[v][2])));
    f[u][0] = mul(f[u][0], pls(f[v][0], f[v][2]));
  }
  cout << pls(f[1][2], f[1][0]);
  return 0;
}
