#include <bits/stdc++.h>
using namespace std;
int nf, ne, ns, rf, re, rs, df, de, tower[13];
double range[20][2], dp[21][21], ans;
void dfs(int x, int c) {
  if (x == 13 || !c) {
    if (c) return;
    memset(dp, 0, sizeof(dp));
    for (int total = 1, now = 0, cnt = 0; total <= nf + ne; total++) {
      while (tower[now] + cnt == 2) now++, cnt = 0;
      cnt++;
      for (int i = 0; i <= min(total, nf); i++) {
        int j = total - i;
        if (j > ne) continue;
        if (i) {
          double l = now - sqrt(rf * rf - 1), r = now + sqrt(rf * rf - 1);
          double damage = df * (r - l);
          for (int k = 0; k < ns; k++) {
            double extra = df * (min(range[k][1], r) - max(range[k][0], l));
            if (extra > 0) damage += extra;
          }
          dp[i][j] = max(dp[i][j], dp[i - 1][j] + damage);
        }
        if (j) {
          double l = now - sqrt(re * re - 1), r = now + sqrt(re * re - 1);
          double damage = de * (r - l);
          for (int k = 0; k < ns; k++) {
            double extra = de * (min(range[k][1], r) - max(range[k][0], l));
            if (extra > 0) damage += extra;
          }
          dp[i][j] = max(dp[i][j], dp[i][j - 1] + damage);
        }
      }
    }
    ans = max(ans, dp[nf][ne]);
  } else {
    tower[x] = 0;
    dfs(x + 1, c);
    if (c) {
      tower[x] = 1;
      range[c - 1][0] = x - sqrt(rs * rs - 1);
      range[c - 1][1] = x + sqrt(rs * rs - 1);
      dfs(x + 1, c - 1);
    }
    if (c > 1) {
      tower[x] = 2;
      range[c - 2][0] = range[c - 1][0];
      range[c - 2][1] = range[c - 1][1];
      dfs(x + 1, c - 2);
    }
    tower[x] = 0;
  }
}
int main() {
  scanf("%d%d%d%d%d%d%d%d", &nf, &ne, &ns, &rf, &re, &rs, &df, &de);
  dfs(0, ns);
  printf("%.10lf", ans);
}
