#include <bits/stdc++.h>

using namespace std;

using ll = long long;

constexpr char newl = '\n';

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int n, m;
    ll c;
    cin >> n >> m >> c;

    vector<ll> a(n), b(m);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    for (int i = 0; i < m; i++) {
        cin >> b[i];
    }
    sort(b.begin(), b.end());

    ll sum = 0;
    for (int i = 0; i < n; i++) {
        ll cnt = b.end() - upper_bound(b.begin(), b.end(), c / a[i]);
        sum += cnt;
    }
    cout << fixed << setprecision(15) << (long double)sum / ((ll)n * m) << newl;

    return 0;
}