#include <bits/stdc++.h>
using namespace std;
const int N = 22, F = 1, E = 2, S = 3;
int nf, ne, ns, rf, re, rs, df, de;
int frzCnt[14];
pair<double, double> range[N];
inline double sqr(double x) { return x * x; }
inline double getDamage(double p, double r, double d) {
  double cd = sqrt(sqr(r) - 1);
  pair<double, double> rg = pair<double, double>(p - cd, p + cd);
  double res = cd * 2;
  for (int i = 1; i <= ns; ++i) {
    pair<double, double> nrg = pair<double, double>(
        max(rg.first, range[i].first), min(rg.second, range[i].second));
    res += max(0.0, nrg.second - nrg.first);
  }
  return res * d;
}
double dp[N][N], damageF[N], damageE[N], res;
int pos[N];
void calcRes() {
  int tmp[14];
  for (int i = 0; i < 13; ++i) tmp[i] = 2 - frzCnt[i];
  for (int i = 1, j = 0; i <= nf + ne; ++i) {
    while (j < 13 && !tmp[j]) ++j;
    if (j == 13) throw logic_error("No empty position");
    pos[i] = j;
    --tmp[j];
  }
  for (int i = 0; i < 13; ++i) {
    damageF[i] = getDamage(i, rf, df);
    damageE[i] = getDamage(i, re, de);
  }
  for (int i = 0; i <= nf; ++i)
    for (int j = 0; j <= ne; ++j) {
      if (i == 0 && j == 0) continue;
      int cp = pos[i + j];
      dp[i][j] = 0;
      if (i > 0) dp[i][j] = max(dp[i][j], dp[i - 1][j] + damageF[cp]);
      if (j > 0) dp[i][j] = max(dp[i][j], dp[i][j - 1] + damageE[cp]);
    }
  res = max(res, dp[nf][ne]);
}
void dfs(int cp, int cr) {
  if (!cr || cp == 13) {
    if (!cr) calcRes();
    return;
  }
  dfs(cp + 1, cr);
  double clen = sqrt((double)sqr(rs) - 1);
  if (cr > 0) {
    range[cr] = pair<double, double>(cp - clen, cp + clen);
    frzCnt[cp] = 1;
    dfs(cp + 1, cr - 1);
    frzCnt[cp] = 0;
  }
  if (cr > 1) {
    range[cr] = range[cr - 1] = pair<double, double>(cp - clen, cp + clen);
    frzCnt[cp] = 2;
    dfs(cp + 1, cr - 2);
    frzCnt[cp] = 0;
  }
}
int main() {
  scanf("%d%d%d%d%d%d%d%d", &nf, &ne, &ns, &rf, &re, &rs, &df, &de);
  dfs(0, ns);
  printf("%.8f\n", res);
  return 0;
}
