mod = 1000000007 eps = 10**-9 def main(): import sys from bisect import bisect_right input = sys.stdin.readline N, M, C = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) B.sort() cnt = 0 for a in A: cnt += M - bisect_right(B, C // a) print(cnt / (N * M)) if __name__ == '__main__': main()