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