#include <bits/stdc++.h>
using namespace std;
double arr[45];
int num[2000005];
inline double inter(double l, double r, double x, double y) {
  return max(min(r, y) - max(l, x), 0.0);
}
int main() {
  for (int i = 0; i < 20; i++) num[1 << i] = i;
  int nf, ne, ns, df, de;
  double rf, re, rs;
  scanf("%d%d%d%lf%lf%lf%d%d", &nf, &ne, &ns, &rf, &re, &rs, &df, &de);
  rf = sqrt(rf * rf - 1);
  re = sqrt(re * re - 1);
  rs = sqrt(rs * rs - 1);
  int n = nf + ne + ns;
  double ans = 0;
  for (int i = 0; i < 1 << n; i++) {
    int cnt = 0;
    for (int j = 0; j < n; j++) {
      if (i & (1 << j)) cnt++;
    }
    if (cnt != ns) continue;
    double sum = 0;
    cnt = 0;
    for (int j = (1 << n) - 1 ^ i; j; j -= j & -j) {
      int p = num[j & -j] >> 1;
      double uf = df * rf * 2, ue = de * re * 2;
      for (int k = i; k; k -= k & -k) {
        int s = num[k & -k] >> 1;
        uf += df * inter(s - rs, s + rs, p - rf, p + rf);
        ue += de * inter(s - rs, s + rs, p - re, p + re);
      }
      sum += uf;
      arr[cnt++] = uf - ue;
    }
    sort(arr, arr + cnt);
    for (int j = 0; j < ne; j++) sum -= arr[j];
    ans = max(ans, sum);
  }
  printf("%.15lf\n", ans);
  return 0;
}
