#include <bits/stdc++.h>
using namespace std;
const long double eqs = 1e-6;
const long long max_ = 2e5 + 7;
const long long mod = 998244353;
const long long inf = 1e9 + 7;
const long long INF = 1e18;
inline long long read() {
  long long s = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    s = s * 10 + ch - '0';
    ch = getchar();
  }
  return s * f;
}
inline void write(long long x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
inline long long min(long long a, long long b) { return a < b ? a : b; }
inline long long max(long long a, long long b) { return a > b ? a : b; }
long long n, size_[max_];
vector<long long> xian[max_];
void dfs(long long now, long long fa) {
  size_[now] = 1;
  for (auto to : xian[now]) {
    if (to == fa) continue;
    dfs(to, now);
    size_[now] += size_[to];
  }
}
long double f[max_];
void dfs2(long long now, long long fa) {
  if (fa) {
    f[now] = f[fa] + (size_[fa] - size_[now] - 1) / 2.0 + 1;
  }
  for (auto to : xian[now]) {
    if (to == fa) continue;
    dfs2(to, now);
  }
}
signed main() {
  n = read();
  for (long long i = 2; i <= n; i++) {
    long long to = read();
    xian[i].push_back(to);
    xian[to].push_back(i);
  }
  dfs(1, 0);
  f[1] = 1.0;
  dfs2(1, 0);
  for (long long i = 1; i <= n; i++) {
    printf("%.1Lf ", f[i]);
  }
  return 0;
}
