#include <bits/stdc++.h>
using namespace std;
const int nmax = 1e5 + 5;
vector<int> v[nmax];
int n;
int d[nmax];
int s[nmax];
void df(int x) {
  s[x] = 1;
  for (auto y : v[x]) {
    d[y] = d[x] + 1;
    df(y);
    s[x] += s[y];
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 2, x; i <= n; i++) {
    scanf("%d", &x);
    v[x].push_back(i);
  }
  d[1] = 1;
  df(1);
  for (int i = 1; i <= n; i++) {
    printf("%.1f ", (n - s[i] + d[i] + 1) * .5);
  }
  return 0;
}
