#include <bits/stdc++.h>
using namespace std;
string s;
vector<long int> a1[100005];
bool visited[111111];
long int a, b, n;
float dfs(long int a, long int b) {
  visited[a] = true;
  float e = 1.0 / b;
  for (long int i = 0; i < a1[a].size(); i++) {
    if (!visited[a1[a][i]]) {
      visited[a1[a][i]] = true;
      e = e + dfs(a1[a][i], b + 1);
    }
  }
  return e;
}
int main() {
  visited[100000] = false;
  cin >> n;
  for (long int i = 1; i < n; i++) {
    cin >> a >> b;
    a1[a].push_back(b);
    a1[b].push_back(a);
  }
  printf("%0.9f", dfs(1, 1));
  return 0;
}
