import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Arrays; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(" "); int n = Integer.parseInt(sa[0]); int m = Integer.parseInt(sa[1]); long c = Long.parseLong(sa[2]); sa = br.readLine().split(" "); long[] a = new long[n]; for (int i = 0; i < n; i++) { a[i] = Integer.parseInt(sa[i]); } sa = br.readLine().split(" "); double[] b = new double[m]; for (int i = 0; i < m; i++) { b[i] = Integer.parseInt(sa[i]); } br.close(); long total = (long) n * m; Arrays.sort(a); Arrays.sort(b); long sum = 0; for (int i = 0; i < n; i++) { long val = c / a[i] + 1; int idx = Arrays.binarySearch(b, val - 0.5); if (idx < 0) idx = ~idx; sum += m - idx; } System.out.println((double) sum / total); } }