#include <bits/stdc++.h>
int i, n, p[100001], s[100001];
float f[100001];
int main() {
  scanf("%d", &n);
  for (i = 2; i <= n; ++i) scanf("%d", p + i);
  for (i = n; i; --i) s[p[i]] += ++s[i];
  for (putchar(49), f[1] = 1, i = 2; i <= n; ++i)
    printf(" %.1f", f[i] = f[p[i]] + (s[p[i]] - s[i] + 1) / 2.);
}
