#include <bits/stdc++.h>
using namespace std;
double max(double a, double b) { return a > b ? a : b; }
double min(double a, double b) { return a < b ? a : b; }
int a[30], r[30], nf, ne, ns, rf, nns, re, rs, df, de, n, m;
double ff, fe, fs, ans;
double gete(int kk, int noww) {
  if (kk > m) kk -= m;
  if (noww > m) noww -= m;
  double k = kk;
  double now = noww;
  double lk = k - fs;
  double rk = k + fs;
  double ln = now - fe;
  double rn = now + fe;
  if (lk > ln) swap(lk, ln);
  return max(0, min(rk - ln, rn - ln)) * de;
}
double getf(int kk, int noww) {
  if (kk > m) kk -= m;
  if (noww > m) noww -= m;
  double k = kk;
  double now = noww;
  double lk = k - fs;
  double rk = k + fs;
  double ln = now - ff;
  double rn = now + ff;
  if (lk > ln) swap(lk, ln);
  return max(0, min(rk - ln, rn - ln)) * df;
}
double get() {
  double ans = nf * df * ff * 2 + ne * de * fe * 2;
  double temp[50];
  int m = 0;
  for (int i = 1; i <= n; i++)
    if (!a[i]) {
      double t1 = 0;
      double t2 = 0;
      for (int j = 0; j < nns; j++) {
        t1 += getf(r[j], i);
        t2 += gete(r[j], i);
      }
      ans += t1;
      temp[m++] = t2 - t1;
    }
  sort(temp, temp + m);
  for (int i = nf; i <= nf + ne - 1; i++) ans += temp[i];
  return ans;
}
void dfs(int t) {
  if (ns == 0)
    ans = max(ans, get());
  else {
    if (t == n + 1) return;
    dfs(t + 1);
    a[t] = 1;
    r[nns - ns] = t;
    ns--;
    dfs(t + 1);
    a[t] = 0;
    ++ns;
  }
}
int main() {
  cin >> nf >> ne >> ns >> rf >> re >> rs >> df >> de;
  nns = ns;
  ff = sqrt((double)rf * rf - 1);
  fe = sqrt((double)re * re - 1);
  fs = sqrt((double)rs * rs - 1);
  n = nf + ne + ns;
  m = (n + 1) / 2;
  ans = 0;
  dfs(1);
  printf("%.7f", ans);
}
