#include <bits/stdc++.h>
using namespace std;
const double pi = 3.14159265358979;
int n, a, b;
vector<int> Gr[100001];
bool used[100001];
long double dfs(int v, int depth) {
  long double res = 0;
  if (used[v]) return res;
  used[v] = true;
  res += 1. / depth;
  for (int i = 0; i < Gr[v].size(); ++i) {
    res += dfs(Gr[v][i], depth + 1);
  }
  return res;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n - 1; ++i) {
    scanf("%d%d", &a, &b);
    Gr[a].push_back(b);
    Gr[b].push_back(a);
  }
  cout << fixed << setprecision(13) << dfs(1, 1);
  return 0;
}
