#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > adj;
int mul(int a, int b) { return 1ll * a * b % 998244353; }
int add(int a, int b) {
  return a + b >= 998244353 ? (a + b - 998244353) : (a + b);
}
int sub(int a, int b) { return a >= b ? a - b : (a + 998244353 - b); }
int mem[200010][3];
int dp(int u, int type) {
  if (mem[u][type] != -1) return mem[u][type];
  vector<int> ALL;
  vector<int> ONE;
  vector<int> TWO;
  int S;
  for (int v : adj[u]) {
    ALL.push_back(dp(v, 0));
    ONE.push_back(dp(v, 1));
  }
  S = ALL.size();
  if (S == 0) {
    return mem[u][type] = 1;
  }
  int zero = 1;
  for (int i = 0; i < S; ++i) {
    zero = mul(zero, ALL[i]);
  }
  int all = 1;
  for (int i = 0; i < ONE.size(); ++i) {
    all = add(mul(all, ONE[i]), mul(all, ALL[i]));
  }
  int one = 0;
  {
    vector<int> C(S);
    for (int i = S - 1; i >= 0; --i) {
      if (i + 1 == S) {
        C[i] = ALL[i];
      } else {
        C[i] = mul(ALL[i], C[i + 1]);
      }
    }
    int f = 1;
    for (int i = 0; i < S; ++i) {
      int t = f;
      if (i + 1 < S) {
        t = mul(t, C[i + 1]);
      }
      one = add(one, mul(ONE[i], t));
      f = mul(f, ALL[i]);
    }
  }
  if (type == 1) {
    return mem[u][type] = sub(all, zero);
  } else if (type == 0) {
    return mem[u][type] = sub(all, one);
  }
}
int main() {
  memset(mem, -1, sizeof(mem));
  int N;
  scanf("%d", &N);
  adj = vector<vector<int> >(N);
  for (int i = 1; i < N; ++i) {
    int p;
    scanf("%d", &p);
    p--;
    adj[p].push_back(i);
  }
  cout << dp(0, 0) << endl;
  return 0;
}
