#include <bits/stdc++.h>
using namespace std;
int nf, ne, ns, rf, re, rs, df, de, n, len;
double ans, a[25], lf, le, ls;
void init() {
  scanf("%d%d%d%d%d%d%d%d", &nf, &ne, &ns, &rf, &re, &rs, &df, &de);
}
void work() {
  lf = sqrt(rf * rf - 1);
  le = sqrt(re * re - 1);
  ls = sqrt(rs * rs - 1);
  n = nf + ne + ns;
  double sum, af, ae;
  int now, now1, now2, tmax = (1 << n) - 1, x, y, i, j;
  for (i = 0; i <= tmax; i++) {
    if (__builtin_popcount(i) != ns) continue;
    sum = len = 0;
    for (now1 = i ^ tmax; now1; now1 &= now1 - 1) {
      x = __builtin_ctz(now1) / 2;
      af = 2 * lf * df;
      ae = 2 * le * de;
      for (now2 = i; now2; now2 &= now2 - 1) {
        y = __builtin_ctz(now2) / 2;
        af += max(0.0, min(x + ls, y + lf) - max(x - ls, y - lf)) * df;
        ae += max(0.0, min(x + ls, y + le) - max(x - ls, y - le)) * de;
      }
      sum += af;
      a[++len] = af - ae;
    }
    sort(a + 1, a + len + 1);
    for (j = 1; j <= ne; j++) sum -= a[j];
    if (sum > ans) ans = sum;
  }
  printf("%.8lf\n", ans);
}
int main() {
  init();
  work();
  return 0;
}
