import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); double p1 = 1; double p2 = 1; double p3 = 1; double p4 = 1; double p5 = 1; for(int i = 0; i < n; i++) { p1 = p1 * ((double)1 / (double)6); p2 = p2 * ((double)2 / (double)6); p3 = p3 * ((double)3 / (double)6); p4 = p4 * ((double)4 / (double)6); p5 = p5 * ((double)5 / (double)6); } double ans = 1 - p5 * (double)6 + p4 * (double)15 - p3 * (double)20 + p2 * (double)15 - p1 * (double)6; System.out.println(ans); } }