#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int INF = 2e9;
const long long INF64 = 3e18;
const double EPS = 1e-9;
const double PI = acos(-1);
const long long MD = 1551513443;
const long long T = 25923;
const int N = 100010;
const int M = 16;
const bool DEBUG = 1;
int n, p[N], z[N];
double ans[N];
vector<int> g[N];
void dfs1(int v) {
  z[v] = 1;
  for (int u : g[v]) {
    dfs1(u);
    z[v] += z[u];
  }
}
void dfs(int v, double sum) {
  sum += 1;
  ans[v] = sum;
  if (int((g[v]).size())) {
    double q = 0.5;
    for (int u : g[v]) {
      sum += q * double(z[u]);
    }
    for (int u : g[v]) {
      dfs(u, sum - q * z[u]);
    }
  }
}
int main() {
  cin >> n;
  for (int i = 2; i <= n; i++) {
    cin >> p[i];
    g[p[i]].push_back(i);
  }
  dfs1(1);
  dfs(1, 0);
  for (int i = 1; i <= n; i++) printf("%.16lf ", ans[i]);
  return 0;
}
