#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int N = 100005;
int p[N];
int sz[N];
int ans[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i <= (n); ++i) sz[i] = 1;
  for (int i = 2; i <= (n); ++i) {
    cin >> p[i];
  }
  for (int i = (n); i >= 1; --i) sz[p[i]] += sz[i];
  for (int i = 1; i <= (n); ++i) {
    ans[i] = 2 + (sz[p[i]] - 1 - sz[i]) + ans[p[i]];
    cout << ans[i] / 2;
    if (ans[i] & 1) cout << ".5";
    cout << ' ';
  }
  cout << endl;
  return 0;
}
