import java.util.Scanner; public class Main_yukicoder352 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); // long[] fact = new long[n + 1]; // fact[0] = 1; // for (int i = 1; i <= n; i++) { // fact[i] = fact[i - 1] * i; // } double ret = 2; for (int i = 3; i <= n; i++) { int m = i - 1; double tmp = (double)2 / (m + 1); for (int j = 1; j <= m; j++) { for (int k = j + 1; k <= m; k++) { if (j == k) { continue; } tmp += (double)2 * j * k / m / (m + 1); } } ret += tmp; } System.out.printf("%.7f\n", ret); sc.close(); } }