import bisect N,M,C=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) a.sort() b.sort() ans=0 for i in a: tmp=C/i ans+=len(b)-bisect.bisect_right(b,tmp) print(ans/len(a)/len(b))