import bisect N,M,C = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) res = 0 for i in range(N): limit = C//a[i] idx = bisect.bisect_right(b,limit) res += idx print((N*M-res)/(N*M))