#include <bits/stdc++.h>
using namespace std;
int Nf, Ne, Ns, N, A, B, i, j, k, Num;
double res, Ans, Wf, We, Rf, Re, Rs, Df, De;
double P[20];
int Count(int x) {
  int res = 0;
  for (; x; x -= x & -x) ++res;
  return res;
}
int Get(int x) {
  int res = 0;
  for (; !(x & 3); x >>= 2) ++res;
  return res;
}
int main() {
  scanf("%d%d%d", &Nf, &Ne, &Ns);
  scanf("%lf%lf%lf", &Rf, &Re, &Rs);
  scanf("%lf%lf", &Df, &De);
  Rf = sqrt(Rf * Rf - 1), Re = sqrt(Re * Re - 1), Rs = sqrt(Rs * Rs - 1);
  N = Nf + Ne + Ns;
  for (i = 0; i < 1 << N; ++i)
    if (Count(i) == Ns) {
      Num = 0, res = 0;
      for (j = (1 << N) - i - 1; j; j -= j & -j) {
        A = Get(j);
        Wf = 2 * Rf * Df, We = 2 * Re * De;
        for (k = i; k; k -= k & -k) {
          B = Get(k);
          Wf += Df * max(0.0, min(A + Rf, B + Rs) - max(A - Rf, B - Rs));
          We += De * max(0.0, min(A + Re, B + Rs) - max(A - Re, B - Rs));
        }
        res += Wf, P[Num++] = Wf - We;
      }
      sort(P, P + Num);
      for (j = 0; j < Ne; ++j) res -= P[j];
      if (res > Ans) Ans = res;
    }
  printf("%.8lf\n", Ans);
  return 0;
}
