#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> v[100005];
double dfs(int node, int parent, int depth) {
  int i, j, k;
  double p, q;
  p = 1 / (double)depth;
  for (i = 0; i < v[node].size(); i++) {
    j = v[node][i];
    if (j == parent) continue;
    p += dfs(j, node, depth + 1);
  }
  return p;
}
int main() {
  int i, j, k;
  scanf("%d", &n);
  for (i = 1; i < n; i++) {
    scanf("%d %d", &j, &k);
    v[j].push_back(k);
    v[k].push_back(j);
  }
  printf("%.8lf\n", dfs(1, 0, 1));
  return 0;
}
