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