#include <bits/stdc++.h>
using namespace std;
int n, nf, ne, ns, fr[20];
double rf, re, rs, df, de, ans;
double insec(double a, double b, double c, double d) {
  return max(0., min(b, d) - max(a, c));
}
double f() {
  double res = 0;
  vector<double> v;
  for (int i = 0; i < n; i++)
    if (!fr[i]) {
      double X = i / 2, F = 2 * rf * df, E = 2 * re * de;
      for (int j = 0; j < n; j++)
        if (fr[j]) {
          double x = j / 2;
          F += insec(X - rf, X + rf, x - rs, x + rs) * df;
          E += insec(X - re, X + re, x - rs, x + rs) * de;
        }
      res += F;
      v.push_back(E - F);
    }
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  for (int i = 0; i < ne; i++) res += v[i];
  return res;
}
int main() {
  cin >> nf >> ne >> ns >> rf >> re >> rs >> df >> de;
  rf = sqrt(rf * rf - 1);
  re = sqrt(re * re - 1);
  rs = sqrt(rs * rs - 1);
  n = nf + ne + ns;
  int temp = n - 1;
  for (int i = 0; i < ns; i++) fr[temp--] = 1;
  do {
    int ok = 1;
    for (int i = 0; i < n / 2; i++) {
      if (fr[i * 2] == 0 && fr[i * 2 + 1] == 1) {
        ok = 0;
        break;
      }
    }
    if (ok) ans = max(ans, f());
  } while (next_permutation(fr, fr + n));
  cout << setprecision(9) << ans;
}
