#include <bits/stdc++.h>
using namespace std;
struct fp {
  int opt;
  double x;
  friend bool operator<(fp a, fp b) { return a.x < b.x; }
} px[101];
int nf, ne, ns, ss, df, de;
double rf, re, rs;
double cost[31], dp[21][21], ans = 0;
int rr, pos[21];
double get(double x) {
  double ans = 0;
  int i;
  for (i = 0; px[i + 1].x < x; ++i)
    ans += (px[i + 1].x - px[i].x) * (px[i].opt + 1);
  ans += (x - px[i].x) * (px[i].opt + 1);
  return ans;
}
void dfs(int a, int b) {
  int i, j, k;
  if (a == rr) {
    if (b != ns) return;
    int plen = 0, sp = 0;
    for (i = 0; i < rr; ++i)
      for (j = 0; j < pos[i]; ++j) {
        px[++plen] = (fp){1, i - rs};
        px[++plen] = (fp){-1, i + rs};
      }
    sort(px + 1, px + plen + 1);
    for (i = 1; i <= plen; ++i) px[i].opt += px[i - 1].opt;
    px[0].x = -2000, px[plen + 1].x = 2000;
    memset(dp, 0, sizeof(dp));
    for (i = 0; i < rr; ++i)
      if (pos[i] < 2) {
        double hf = df * (get(i + rf) - get(i - rf)),
               he = de * (get(i + re) - get(i - re));
        for (int i2 = pos[i]; i2 < 2; ++i2)
          for (j = nf; j >= 0; --j)
            for (k = ne; k >= 0; --k) {
              if (j && dp[j - 1][k] + hf > dp[j][k])
                dp[j][k] = dp[j - 1][k] + hf;
              if (k && dp[j][k - 1] + he > dp[j][k])
                dp[j][k] = dp[j][k - 1] + he;
            }
      }
    if (dp[nf][ne] > ans) ans = dp[nf][ne];
    return;
  }
  for (j = 0; j <= 2 && b + j <= ns; ++j) {
    dfs(a + 1, b + j);
    pos[a]++;
  }
  pos[a] = 0;
}
int main() {
  int i, j, k;
  scanf("%d%d%d%lf%lf%lf%d%d", &nf, &ne, &ns, &rf, &re, &rs, &df, &de);
  ss = nf + ne + ns;
  rf = sqrt(rf * rf - 1);
  re = sqrt(re * re - 1);
  rs = sqrt(rs * rs - 1);
  rr = 13;
  dfs(0, 0);
  printf("%.12lf\n", ans);
  return 0;
}
