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