n,m,C=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) a.sort() b.sort() from bisect import bisect_right print(sum(m-bisect_right(b,C/a[i]) for i in range(n))/(n*m))