#include <bits/stdc++.h>
using namespace std;
bool visited[100100];
double dfs(vector<vector<int> > &g, int u, int l) {
  visited[u] = true;
  double res = 1. / (l + 1);
  for (auto iter = g[u].cbegin(); iter != g[u].cend(); ++iter) {
    if (!visited[*iter]) {
      res += dfs(g, *iter, l + 1);
    }
  }
  return res;
}
int main(int argc, char *const argv[]) {
  int n = 0;
  cin >> n;
  vector<vector<int> > g;
  for (int i = 0; i <= n; ++i) {
    vector<int> v;
    g.push_back(v);
  }
  for (int i = 0; i < n - 1; ++i) {
    int a = 0, b = 0;
    cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  cout << setprecision(20) << dfs(g, 1, 0) << endl;
  return 0;
}
