#include <bits/stdc++.h>
using namespace std;
double ans = 0.0000;
void dfs(int node, int depth);
list<int> arr[100005];
int progress[100005];
int main() {
  int n, i, start, end;
  cin >> n;
  n--;
  while (n--) {
    cin >> start;
    cin >> end;
    arr[start].push_back(end);
    arr[end].push_back(start);
  }
  dfs(1, 1);
  cout.precision(7);
  cout << fixed << ans;
  return 0;
}
void dfs(int node, int depth) {
  progress[node] = 1;
  double d;
  d = 1 / (double)depth;
  ans += d;
  list<int>::iterator iter = arr[node].begin();
  for (; iter != arr[node].end(); ++iter) {
    if (!progress[*iter]) dfs(*iter, depth + 1);
  }
}
