#include <bits/stdc++.h>
using namespace std;
int nf, ne, ns, rf, re, rs, df, de;
double lf, le, ls, ret;
void init() {
  scanf("%d%d%d%d%d%d%d%d", &nf, &ne, &ns, &rf, &re, &rs, &df, &de);
}
const int maxn = 21;
double tmp[maxn];
inline double Fmin(double x, double y) { return x < y ? x : y; }
inline double Fmax(double x, double y) { return x > y ? x : y; }
inline double check(double l1, double r1, double l2, double r2) {
  if (l1 >= r2) return 0;
  if (r1 <= l2) return 0;
  return Fmin(r1, r2) - Fmax(l1, l2);
}
void work() {
  lf = sqrt(rf * rf - 1.0);
  le = sqrt(re * re - 1.0);
  ls = sqrt(rs * rs - 1.0);
  int n = nf + ne + ns;
  int s = (1 << n) - 1;
  ret = 0;
  for (int ss = 0; ss < s; ss++)
    if (__builtin_popcount(ss) == ns) {
      double cur = 0;
      int size = 0;
      for (int s0 = s ^ ss; s0; s0 -= ((s0) & ((s0) ^ ((s0)-1)))) {
        int now = __builtin_ctz(s0) >> 1;
        double tf = 2 * lf * df, te = 2 * le * de;
        for (int s1 = ss; s1; s1 -= ((s1) & ((s1) ^ ((s1)-1)))) {
          int th = __builtin_ctz(s1) >> 1;
          tf += df * check(th - ls, th + ls, now - lf, now + lf);
          te += de * check(th - ls, th + ls, now - le, now + le);
        }
        cur += tf;
        tmp[size++] = tf - te;
      }
      sort(tmp, tmp + size);
      for (int i = 0; i < ne; i++) cur -= tmp[i];
      if (cur > ret) ret = cur;
    }
}
void print() { printf("%.10lf\n", ret); }
int main() {
  init();
  work();
  print();
  return 0;
}
