#include <bits/stdc++.h>
using namespace std;
const int N = 200021;
inline int scan() {
  char c = getchar();
  int x = 0;
  while (c < '0' || c > '9') {
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 1) + (x << 3) + c - '0';
    c = getchar();
  }
  return x;
}
long long int n;
vector<long long int> g[N];
long long int sz[N];
long long int d[N];
void dfs(long long int x) {
  sz[x] = 1;
  for (auto y : g[x]) {
    d[y] = d[x] + 1;
    dfs(y);
    sz[x] += sz[y];
  }
}
int main() {
  cin >> n;
  for (long long int i = 2; i <= n; i++) {
    long long int x;
    cin >> x;
    g[x].push_back(i);
  }
  dfs(1);
  for (long long int i = 1; i <= n; i++) {
    long long int ans = n - sz[i] - d[i] + 2 * (d[i] + 1);
    cout << ans / 2 << ".";
    if (ans & 1)
      cout << "5 ";
    else
      cout << "0 ";
  }
  return 0;
}
