#include <bits/stdc++.h>
using namespace std;
int i, n, si[111111], x[111111];
double ans[111111];
int main() {
  scanf("%d", &n);
  for (i = 1; i < n; i++) scanf("%d", &x[i]);
  for (i = n - 1; i >= 1; i--) {
    si[x[i] - 1] += ++si[i];
  }
  si[0]++;
  ans[0] = 1;
  printf("%lf ", ans[0]);
  for (i = 1; i < n; i++) {
    ans[i] = (si[x[i] - 1] - si[i] - 1) * 0.5 + ans[x[i] - 1] + 1;
    printf("%lf ", ans[i]);
  }
  return 0;
}
