import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int K = scan.nextInt(); scan.close(); int n = 1000000; int a; if(K % 6 != 0) { a = K / 6 + 1; }else { a = K / 6; } int cnt = 0; double ans = 0; for(int i = 0; i < n; i++) { int p = 0; for(int j = 1; j <= K; j++) { p += (int)(Math.random() * 6) + 1; if(p >= K) { cnt += j; break; } } } ans += (double) cnt / n; System.out.println(ans); } }