from bisect import * N, M, C = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) A.sort() B.sort() ans = 0 for a in A: v = C//a ans += M - bisect_right(B, v) # print(a, v) print(ans/N/M)