#include <bits/stdc++.h>
void Get(int &T) {
  char C;
  bool F = 0;
  for (; C = getchar(), C < '0' || C > '9';)
    if (C == '-') F = 1;
  for (T = C - '0'; C = getchar(), C >= '0' && C <= '9'; T = T * 10 + C - '0')
    ;
  F && (T = -T);
}
int NF, NE, NS, N;
int RF, RE, RS;
int DF, DE;
long double LF, LE, LS;
void Init() {
  Get(NF);
  Get(NE);
  Get(NS);
  Get(RF);
  Get(RE);
  Get(RS);
  Get(DF);
  Get(DE);
  N = NF + NE + NS;
  LF = sqrtl(RF * RF - 1);
  LE = sqrtl(RE * RE - 1);
  LS = sqrtl(RS * RS - 1);
}
int Stack[35];
int Sum[35];
int Top;
int Pos[35];
double Intersect(double L, double R, double L1, double R1) {
  if (L1 > L) L = L1;
  if (R1 < R) R = R1;
  if (R < L) return 0;
  return R - L;
}
double Ans;
double KE[15][15];
double KF[15][15];
double VE[15];
double VF[15];
double F[25][25];
void Check() {
  for (int i = 1; i <= 13; i++) {
    VE[i] = LE + LE;
    VF[i] = LF + LF;
    for (int j = 1; j <= 13; j++) {
      VE[i] += KE[i][j] * Stack[j];
      VF[i] += KF[i][j] * Stack[j];
    }
    VE[i] *= DE;
    VF[i] *= DF;
  }
  for (int i = 0; i <= NF; i++)
    for (int j = 0; j <= NE; j++) {
      F[i][j] = 0;
    }
  for (int k = 1; k <= 13; k++)
    for (int p = Stack[k] + 1; p <= 2; p++) {
      for (int i = NF; i >= 0; i--)
        for (int j = NE; j >= 0; j--) {
          if (j >= 1 && F[i][j] < F[i][j - 1] + VE[k])
            F[i][j] = F[i][j - 1] + VE[k];
          if (i >= 1 && F[i][j] < F[i - 1][j] + VF[k])
            F[i][j] = F[i - 1][j] + VF[k];
        }
    }
  if (F[NF][NE] > Ans) Ans = F[NF][NE];
}
int All;
void DFS(int M, int Cnt) {
  if (M > 13) {
    if (Cnt == 0) {
      Check();
      All++;
    }
    return;
  }
  Stack[M] = 0;
  DFS(M + 1, Cnt);
  if (Cnt >= 1) {
    Stack[M] = 1;
    DFS(M + 1, Cnt - 1);
  }
  if (Cnt >= 2) {
    Stack[M] = 2;
    DFS(M + 1, Cnt - 2);
  }
}
void Work() {
  for (int i = 1; i <= 13; i++)
    for (int j = 1; j <= 13; j++) {
      KE[i][j] = Intersect(i - LE, i + LE, j - LS, j + LS);
      KF[i][j] = Intersect(i - LF, i + LF, j - LS, j + LS);
    }
  DFS(1, NS);
}
void Output() { printf("%.12lf\n", Ans); }
int main() {
  Init();
  Work();
  Output();
  return 0;
}
