#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
vector<int> e[100007];
int n;
double ans = 0.0;
void dfs(int x, int fa, int path) {
  ans += 1.0 / (path + 1);
  for (typeof(e[x].begin()) it = e[x].begin(); it != e[x].end(); it++) {
    if (*it != fa) {
      dfs(*it, x, path + 1);
    }
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    --u, --v;
    e[u].push_back(v);
    e[v].push_back(u);
  }
  dfs(0, -1, 0);
  printf("%.10f\n", ans);
  return 0;
}
