#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<vector<int> > adjl(n);
  for (int i = 0, u, v; i < n - 1; ++i) {
    cin >> u >> v;
    --u;
    --v;
    adjl[u].push_back(v);
    adjl[v].push_back(u);
  }
  vector<bool> visit(n);
  visit[0] = true;
  vector<vector<int> > a(1, vector<int>(1, 0));
  for (int i = 0; !a[i].empty(); ++i) {
    a.push_back(vector<int>());
    for (int j = 0; j < int(a[i].size()); ++j) {
      for (int k = 0; k < int(adjl[a[i][j]].size()); ++k) {
        if (!visit[adjl[a[i][j]][k]]) {
          visit[adjl[a[i][j]][k]] = true;
          a[i + 1].push_back(adjl[a[i][j]][k]);
        }
      }
    }
  }
  double ans = 0;
  for (int i = 0; i < int(a.size()); ++i) {
    ans += double(1) / (i + 1) * a[i].size();
  }
  cout.precision(6);
  cout << fixed << ans;
  return 0;
}
