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