#include <bits/stdc++.h>
using namespace std;
vector<int> q[100005];
double dp[100005];
double cnt = 0;
void dfs(int x, int pre, int k) {
  cnt += 1.0 / k;
  for (int i = 0; i < q[x].size(); i++) {
    int v = q[x][i];
    if (v == pre) continue;
    dfs(v, x, k + 1);
  }
}
int main() {
  int n;
  scanf("%d", &n);
  int x, y;
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    q[x].push_back(y);
    q[y].push_back(x);
  }
  dfs(1, 0, 1);
  printf("%.10f\n", cnt);
}
