import sys input=sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) N,M,C=MI() A=LI() B=LI() A.sort() B.sort() import bisect ans=0 for i in range(N): a=A[i] t=C/a num=bisect.bisect_right(B,t) ans+=M-num def my_round(x,y,a): ans=x//y rem=x%y L=[0]*a for i in range(a): rem*=10 temp=(rem//y) # print(i,temp) L[i]=temp rem%=y rem*=10 temp=(rem//y) if temp>=5: L[-1]+=1 ans=str(ans)+"."+"".join(map(str,L)) return float(ans) ans=my_round(ans,N*M,7) print(ans)