#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int N, nf, ne, ns, rf, re, rs, df, de;
double CC;
int Count(int x) {
  int cnt = 0;
  for (; x; cnt += x & 1, x >>= 1)
    ;
  return cnt;
}
int M, cnt[20];
double frg[30], erg[30];
double f[30][30][30];
double Overlap(int pa, int ra, int pb, int rb) {
  double La = (double)pa - sqrt((double)ra * ra - 1.0),
         Ra = (double)pa + sqrt((double)ra * ra - 1.0),
         Lb = (double)pb - sqrt((double)rb * rb - 1.0),
         Rb = (double)pb + sqrt((double)rb * rb - 1.0);
  if (Lb < La) swap(La, Lb), swap(Ra, Rb);
  if (Ra < Lb) return 0;
  return min(Ra, Rb) - Lb;
}
void work(int S, int r, double *rg) {
  for (int i = 0; i <= N / 2; ++i) {
    rg[i] = sqrt((double)r * r - 1.0) * 2;
    for (int j = 0; j <= N / 2; ++j)
      if (cnt[j]) rg[i] += Overlap(i, r, j, rs) * cnt[j];
  }
}
void calc(int S) {
  for (int j = 0; j <= N / 2; ++j)
    cnt[j] = (((S & (1 << (j << 1))) > 0) + ((S & (1 << ((j << 1) + 1))) > 0));
  work(S, rf, frg);
  work(S, re, erg);
  f[0][0][0] = 0;
  M = 0;
  for (int i = 0; i <= N / 2; ++i)
    for (int tt = 1; tt <= (((i * 2) < N) + ((i * 2 + 1) < N)) - cnt[i]; ++tt) {
      ++M;
      for (int x = 0; x <= nf; ++x)
        for (int y = 0; y <= ne; ++y) {
          f[M][x][y] = f[M - 1][x][y];
          if (x) f[M][x][y] = max(f[M][x][y], f[M - 1][x - 1][y] + frg[i] * df);
          if (y) f[M][x][y] = max(f[M][x][y], f[M - 1][x][y - 1] + erg[i] * de);
        }
    }
  CC = max(CC, f[M][nf][ne]);
}
int main() {
  cin >> nf >> ne >> ns >> rf >> re >> rs >> df >> de;
  N = nf + ne + ns;
  for (int i = 0; i < (1 << N); ++i)
    if (Count(i) == ns) calc(i);
  printf("%.10lf\n", CC);
  fclose(stdin);
  fclose(stdout);
  return 0;
}
