import bisect n,m,c = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) b = sorted(b) ans = 0 for x in a: k = c//x p = bisect.bisect_right(b,k) ans += m-p #print(k,p) print(ans/(n*m))