import bisect n,m,c=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) b=sorted(b) cnt=0 for i in range(n): pos=bisect.bisect_right(b,c//a[i]) cnt+=m-pos print(cnt/(n*m))