#include <bits/stdc++.h>
using namespace std;
double e;
vector<vector<int> > g;
void calcula(int u, int p, int prof) {
  e += 1.0 / double(prof);
  vector<int> &ar = g[u];
  for (int i = 0; i < int(ar.size()); i++) {
    int v = ar[i];
    if (v != p) calcula(v, u, prof + 1);
  }
}
int main() {
  cout.setf(ios::fixed);
  cout.precision(10);
  int n;
  cin >> n;
  g = vector<vector<int> >(n);
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  e = 0;
  calcula(0, -1, 1);
  cout << e << endl;
}
