#include <bits/stdc++.h>
using namespace std;
template <typename T>
T abs(T a) {
  return a < 0 ? -a : a;
}
template <typename T>
T sqr(T a) {
  return a * a;
}
const int INF = (int)1e9;
const long double EPS = 1e-9;
const long double PI = 3.1415926535897932384626433832795;
int nf, ne, ns;
int rf, re, rs;
int df, de;
const int N = 13;
const int T = 30;
int sl[N];
int cnts;
long double ans;
long double slf[T], srg[T];
inline long double getIntersect(int x, int r) {
  long double sr = sqrtl(r * r - 1);
  long double clf = x - sr, crg = x + sr;
  long double sum = crg - clf;
  for (int i = 0; i < int(ns); ++i) {
    long double lf = max(clf, slf[i]);
    long double rg = min(crg, srg[i]);
    if (lf + EPS < rg) sum += rg - lf;
  }
  return sum;
}
vector<pair<long double, long double> > d;
bool cmpY(const pair<long double, long double>& a,
          const pair<long double, long double>& b) {
  return a.second > b.second;
}
long double z[T][T];
int cused;
int used[T][T];
long double solveD(int f, int e) {
  if (used[f][e] < cused) {
    used[f][e] = cused;
    int m = int((d).size()) - (nf - f) - (ne - e);
    if (f == 0) {
      sort(d.begin(), d.begin() + m, cmpY);
      z[f][e] = 0;
      for (int i = 0; i < int(e); ++i) z[f][e] += d[i].second;
      sort(d.begin(), d.begin() + m);
      return z[f][e];
    }
    z[f][e] = solveD(f - 1, e) + d[m - 1].first;
    if (e > 0) z[f][e] = max(z[f][e], solveD(f, e - 1) + d[m - 1].second);
  }
  return z[f][e];
}
inline long double dinProg() {
  cused++;
  return solveD(nf, ne);
}
int CNT;
void solve(int idx) {
  if (idx == N) {
    if (cnts != 0) throw;
    CNT++;
    int st = 0;
    for (int i = 0; i < int(N); ++i) {
      if (sl[i] == 0) continue;
      long double sr = sqrtl(rs * rs - 1);
      long double clf = i - sr, crg = i + sr;
      for (int j = 0; j < int(sl[i]); ++j) {
        slf[st] = clf;
        srg[st] = crg;
        st++;
      }
    }
    d.clear();
    for (int i = 0; i < int(N); ++i) {
      if (sl[i] == 2) continue;
      pair<long double, long double> cd(getIntersect(i, rf) * df,
                                        getIntersect(i, re) * de);
      for (int j = 0; j < int(2 - sl[i]); ++j) d.push_back(cd);
    }
    sort((d).begin(), (d).end());
    ans = max(ans, dinProg());
    return;
  }
  for (int cs = int(3) - 1; cs >= 0; --cs) {
    if ((N - idx - 1) * 2 + cs >= cnts && cnts >= cs) {
      sl[idx] = cs;
      cnts -= cs;
      solve(idx + 1);
      cnts += cs;
    }
  }
}
int main() {
  cin >> nf >> ne >> ns >> rf >> re >> rs >> df >> de;
  cnts = ns;
  solve(0);
  cout.precision(10);
  cout << fixed << ans << endl;
  cerr << CNT << " " << clock() << endl;
  return 0;
}
