#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n, p, ans, c[maxn], d[maxn];
vector<int> G[maxn];
void dfs(int u) {
  c[u] = 1;
  for (int i = 0; i < G[u].size(); i++) {
    int v = G[u][i];
    d[v] = d[u] + 1;
    dfs(v);
    c[u] += c[v];
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) {
    scanf("%d", &p);
    G[p].push_back(i);
  }
  dfs(1);
  for (int i = 1; i <= n; i++) {
    ans = n - c[i] + d[i] + 2;
    printf("%d.", ans / 2);
    printf(ans & 1 ? "5 " : "0 ");
  }
  puts("");
  return 0;
}
