from collections import Counter from bisect import bisect_right n,m,c = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) b.sort() ans = 0 for i in range(n): elem = c // a[i] ind = bisect_right(b,elem) ans += m - ind print(ans / (n * m))