#include <bits/stdc++.h>
int n, ne, ns, nf, rs, re, rf, de, df, t, Snow[40];
double f[30][30][30], Ans;
struct pt {
  double x;
  int y;
} p[50];
bool cmp(pt a, pt b) { return a.x < b.x; }
double MIN(double a, double b) { return a < b ? a : b; }
double MAX(double a, double b) { return a > b ? a : b; }
double Calc(int x, int r) {
  int i, k;
  double L, R, Now, Min, Max;
  L = 1.0 * x - sqrt(1.0 * r * r - 1.0);
  R = 1.0 * x + sqrt(1.0 * r * r - 1.0);
  Now = 0;
  if (L <= p[0].x) Now += p[0].x - L;
  if (R >= p[t - 1].x) Now += R - p[t - 1].x;
  for (k = 1, i = 0; i + 1 < t; i++) {
    k += p[i].y;
    Max = MIN(p[i + 1].x, R);
    Min = MAX(L, p[i].x);
    if (Min <= Max) Now += (Max - Min) * k;
  }
  return Now;
}
void Update(double& x, double y) {
  if (x < y) x = y;
}
void Solve() {
  int i, j, k, Fir, Ele;
  double CalcE, CalcF;
  memset(f, 0, sizeof f);
  t = 0;
  for (i = 0; i < n; i++) {
    p[t++] = (pt){1.0 * i - sqrt(1.0 * rs * rs - 1.0), Snow[i]};
    p[t++] = (pt){1.0 * i + sqrt(1.0 * rs * rs - 1.0), -Snow[i]};
  }
  std::sort(p, p + t, cmp);
  for (i = 0; i < n; i++) {
    CalcF = Calc(i, rf) * df;
    CalcE = Calc(i, re) * de;
    for (Fir = 0; Fir + Snow[i] <= 2; Fir++)
      for (Ele = 0; Ele + Fir + Snow[i] <= 2; Ele++)
        for (j = 0; j + Fir <= nf; j++)
          for (k = 0; k + Ele <= ne; k++)
            Update(f[i + 1][j + Fir][k + Ele],
                   f[i][j][k] + CalcF * Fir + CalcE * Ele);
  }
  if (f[n][nf][ne] > Ans) Ans = f[n][nf][ne];
}
void Dfs(int l, int Res) {
  if (l == n) {
    if (!Res) Solve();
    return;
  }
  for (Snow[l] = 0; Snow[l] <= 2 && Snow[l] <= Res; Snow[l]++)
    Dfs(l + 1, Res - Snow[l]);
}
int main() {
  scanf("%d%d%d%d%d%d%d%d", &nf, &ne, &ns, &rf, &re, &rs, &df, &de);
  n = (ns + ne + nf + 1) / 2;
  Dfs(0, ns);
  printf("%.10lf\n", Ans);
  return 0;
}
