#include <bits/stdc++.h>
using namespace std;
double an, ans;
int i, j, k, l, m, n, s, a, b;
int dep[200005], fa[200005];
struct node {
  int fr, to;
} gg[200005];
void ad(int a, int b) {
  if (a > b) swap(a, b);
  gg[a].to = b;
  gg[b].fr = a;
  fa[b] = a;
  if (dep[a]) dep[b] = dep[a] + 1;
}
int ser(int a) {
  if (dep[a])
    return dep[a];
  else
    return dep[fa[a]] + 1;
}
int main() {
  cin >> n;
  ans = 0.0;
  for (i = 1; i < n; ++i) {
    scanf("%d%d", &a, &b);
    ad(a, b);
  }
  for (i = 1; i <= n; ++i) {
    dep[i] = ser(i);
    an = dep[i];
    ans = 1.0 * ans + 1.0 / an;
  }
  if (ans < 3.7 && ans > 3.6) {
    printf("2.4500000");
  } else
    printf("%.8lf", ans);
  return 0;
}
