#include <bits/stdc++.h>
using namespace std;
int n, p[100010], e[100010];
double ans[100010];
int main() {
  ans[1] = 1.0;
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) {
    scanf("%d", &p[i]);
  }
  for (int i = n; i >= 1; i--) {
    e[i]++;
    e[p[i]] += e[i];
  }
  for (int i = 2; i <= n; i++) {
    ans[i] = ans[p[i]] + (e[p[i]] - e[i] - 1) / 2.0 + 1;
  }
  for (int i = 1; i <= n; i++) {
    printf("%.1f ", ans[i]);
  }
  return 0;
}
