#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 9;
vector<int> E[maxn];
double expect[maxn];
int children[maxn], n, father[maxn];
void dfs(int x) {
  children[x] = 1;
  if (E[x].size() == 0) {
    return;
  }
  for (vector<int>::iterator it = E[x].begin(); it != E[x].end(); it++) {
    dfs(*it);
    children[x] += children[*it];
  }
}
void dfs2(int x) {
  if (E[x].size() == 0) {
    return;
  }
  for (vector<int>::iterator it = E[x].begin(); it != E[x].end(); it++) {
    expect[*it] = expect[x] + (children[x] - children[*it] - 1) / 2.0 + 1;
    dfs2(*it);
  }
}
int main() {
  int xx;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) E[i].clear();
  father[1] = -1;
  for (int i = 2; i <= n; i++) {
    scanf("%d", &father[i]);
    E[father[i]].push_back(i);
  }
  dfs(1);
  expect[1] = 1;
  dfs2(1);
  printf("1.0");
  for (int i = 2; i <= n; i++) printf(" %.1lf", expect[i]);
  puts("");
  return 0;
}
