import bisect n, m, c = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) b = sorted(b) all_ptn = n * m ptn = 0 for val in a: other = c // val + 1 idx = bisect.bisect_left(b, other) ptn += m - idx print(ptn /all_ptn)