#include <bits/stdc++.h>
using namespace std;
double PI = acos(-1);
double EPS = 1e-7;
int INF = 1000000000;
int MAXINT = 2147483647;
long long INFLL = 1000000000000000000LL;
long long MAXLL = 9223372036854775807LL;
int mx[8] = {-1, 1, 0, 0, -1, -1, 1, 1};
int my[8] = {0, 0, -1, 1, -1, 1, -1, 1};
vector<int> adj[100005];
double dfs(int u, int par, int d) {
  double ret = 1.0 / (1 + d);
  for (int(a) = (0); (a) <= ((int)adj[u].size() - 1); (a)++) {
    int v = adj[u][a];
    if (v == par) continue;
    ret += dfs(v, u, d + 1);
  }
  return ret;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int(a) = (1); (a) <= (n - 1); (a)++) {
    int u, v;
    scanf("%d%d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  printf("%.8lf\n", dfs(1, 0, 0));
}
