import java.util.*; import java.text.DecimalFormat; public class dice { public static void main(String[] args) { Scanner s = new Scanner(System.in); DecimalFormat fmt = new DecimalFormat("0.00000"); while (true) { int n = s.nextInt(); if (n == 0) break; double[][] answer = new double[n][1001]; for (int i = 0; i < n; i++) { String temp = s.next(); int up = Integer.parseInt(temp.substring(1)); if (i == 0) { for (int j = 1; j <= up; j++) { answer[0][j] = 1.0 / up; } } else { for (int j = 1; j <= up; j++) { for (int k = 1; k <= 1000; k++) { if (answer[i - 1][k] == 0) continue; answer[i][j + k] += answer[i - 1][k] * 1.0 / up; } } } } int index = s.nextInt(); System.out.println(fmt.format(answer[n - 1][index])); } } }