import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); if (n < 6) { System.out.println(0); return; } double[][] rates = new double[n][6]; rates[0][0] = 1; for (int i = 1; i < n; i++) { for (int j = 0; j < 6; j++) { if (j == 0) { rates[i][j] = rates[i - 1][j] / 6; } else { rates[i][j] = rates[i - 1][j] * (j + 1) / 6 + rates[i - 1][j - 1] * (6 - j) / 6; } } } System.out.println(rates[n - 1][5]); } }