import java.util.Scanner; public class Yukicoder75 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int K = sc.nextInt(); int num; double count = 0, sum = 0; for (int i = 0; i < 800000; i++) { num = 0; while (num < K) { num += (int) (Math.random() * 6 + 1); count++; } if (num == K) { sum++; } } System.out.println(count / sum); } }