#include <bits/stdc++.h>
using namespace std;
int n, lis[100005], dp[100005], ans[100005];
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i < n + 1; i++) dp[i] = 1;
  for (int i = 2; i < n + 1; i++) cin >> lis[i];
  for (int i = n; i > 1; i--) {
    dp[lis[i]] += dp[i];
  }
  ans[1] = 2;
  for (int i = 2; i < n + 1; i++) {
    ans[i] = ans[lis[i]] + 1 + dp[lis[i]] - dp[i];
  }
  for (int i = 1; i < n + 1; i++) {
    cout << ans[i] / 2;
    if (ans[i] & 1) cout << ".5";
    cout << ' ';
  }
}
