#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
const int mn = 10;
int n;
int m;
int n1, n2, n3;
double r1, r2, r3, d1, d2;
int was[mn][21][21];
double res[mn][21][21];
double pd1[mn], pd2[mn];
int q[mn];
int s[mn];
int ct;
double get(double x, double r) {
  double tmp = 2 * r;
  for (int i = 0; i < mn; i++) {
    double L = max(i - r3, x - r);
    double R = min(i + r3, x + r);
    tmp += q[i] * max(R - L, 0.0);
  }
  return tmp;
}
double go2(int i, int j, int k) {
  if (i == mn || j == 0 && k == 0) return 0;
  if (s[i] < j + k) return 0;
  if (was[i][j][k] == ct) return res[i][j][k];
  was[i][j][k] = ct;
  double cur = go2(i + 1, j, k);
  if (q[i] < 2) {
    q[i]++;
    s[i]--;
    if (j) cur = max(cur, go2(i, j - 1, k) + pd1[i]);
    if (k) cur = max(cur, go2(i, j, k - 1) + pd2[i]);
    q[i]--;
    s[i]++;
  }
  return res[i][j][k] = cur;
}
double calc() {
  for (int i = 0; i < mn; i++) {
    pd1[i] = get(i, r1) * d1;
    pd2[i] = get(i, r2) * d2;
  }
  for (int i = mn - 1; i >= 0; i--) {
    s[i] = 2 - q[i];
    if (i + 1 < mn) s[i] += s[i + 1];
  }
  ct++;
  return go2(0, n1, n2);
}
double go(int i, int j) {
  if (i == mn || j == 0) return calc();
  if ((mn - i) * 2 < j) return 0;
  q[i] = 0;
  double cur = go(i + 1, j);
  if (j > 0) {
    q[i] = 1;
    cur = max(cur, go(i + 1, j - 1));
  }
  if (j > 1) {
    q[i] = 2;
    cur = max(cur, go(i + 1, j - 2));
  }
  q[i] = 0;
  return cur;
}
int main() {
  cin >> n1 >> n2 >> n3;
  cin >> r1 >> r2 >> r3;
  r1 = sqrt(abs(r1 * r1 - 1));
  r2 = sqrt(abs(r2 * r2 - 1));
  r3 = sqrt(abs(r3 * r3 - 1));
  cin >> d1 >> d2;
  printf("%.10f\n", go(0, n3));
  return 0;
}
