#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-13;
const int maxn = 501010;
int day, n;
double W, ans = 0.0, s1, s2, s3;
double c[maxn], dt[maxn], w[maxn];
pair<double, double> Small[maxn], Equal[maxn], Large[maxn], a[maxn];
int nSmall, nEqual, nLarge, N;
long long ansInt = 0LL;
int cmp(double x) {
  if (fabs(x) <= eps) return 0;
  return (x > eps) ? 1 : -1;
}
int CMP(pair<double, double> a, pair<double, double> b) {
  return cmp(a.first * b.second - b.first * a.second);
}
void work(double W) {
  pair<double, double> cur = a[(N + 1) / 2];
  double w = W;
  nSmall = nEqual = nLarge = 0;
  s1 = s2 = s3 = 0.0;
  for (int i = 1; i <= N; i++) switch (CMP(a[i], cur)) {
      case -1:
        Small[++nSmall] = a[i];
        s1 += a[i].second;
        break;
      case 0:
        Equal[++nEqual] = a[i];
        s2 += a[i].second;
        break;
      case 1:
        Large[++nLarge] = a[i];
        s3 += a[i].second;
        break;
    }
  if (cmp(s1 - w) >= 0) {
    N = nSmall;
    for (int i = 1; i <= N; i++) a[i] = Small[i];
    work(w);
  } else if (cmp(s1 + s2 - w) >= 0) {
    for (int i = 1; i <= nSmall; i++) ansInt += (long long)Small[i].first;
    w -= s1;
    for (int i = 1; i <= nEqual; i++)
      if (cmp(Equal[i].second - w) >= 0) {
        ansInt += (long long)w * (long long)Equal[i].first /
                  (long long)Equal[i].second;
        ans += (double)((long long)(w * Equal[i].first) %
                        (long long)Equal[i].second) /
               Equal[i].second;
        return;
      } else
        ansInt += (long long)Equal[i].first, w -= Equal[i].second;
  } else {
    for (int i = 1; i <= nSmall; i++) ansInt += (long long)Small[i].first;
    for (int i = 1; i <= nEqual; i++) ansInt += (long long)Equal[i].first;
    w -= s1 + s2;
    N = nLarge;
    for (int i = 1; i <= N; i++) a[i] = Large[i];
    work(w);
  }
}
int main() {
  cin >> day >> n >> W;
  int x;
  for (int i = 1; i <= n; i++) scanf("%d", &x), w[i] = (double)x;
  for (int i = 1; i <= n; i++) scanf("%d", &x), c[i] = (double)x;
  for (int i = 1; i <= n; i++) scanf("%d", &x), dt[i] = (double)x;
  for (; day; day--) {
    N = 0;
    for (int i = 1; i <= n; i++)
      if (cmp(w[i])) a[++N] = make_pair(c[i], w[i]);
    work(W);
    for (int i = 1; i <= n; i++) c[i] -= dt[i];
  }
  double cur = floor(ans);
  ansInt += (int)round(cur);
  ans -= cur;
  cout << ansInt;
  char buf[1024];
  sprintf(buf, "%.18lf", ans);
  printf("%s\n", buf + 1);
  return 0;
}
