Problem: Vasya plays the Power Defence. 

He must pass the last level of the game. In order to do this he must kill the Main Villain, who moves in a straight line at speed 1 meter per second from the point ( - ∞, 0) to the point ( + ∞, 0) of the game world. In the points (x, 1) and (x, - 1), where x is an integer number, Vasya can build towers of three types: fire-tower, electric-tower or freezing-tower. However, it is not allowed to build two towers at the same point. Towers of each type have a certain action radius and the value of damage per second (except freezing-tower). If at some point the Main Villain is in the range of action of k freezing towers then his speed is decreased by k + 1 times.

The allowed number of towers of each type is known. It is necessary to determine the maximum possible damage we can inflict on the Main Villain.

All distances in the problem are given in meters. The size of the Main Villain and the towers are so small, that they can be considered as points on the plane. The Main Villain is in the action radius of a tower if the distance between him and tower is less than or equal to the action radius of the tower.

Input

The first line contains three integer numbers nf, ne and ns — the maximum number of fire-towers, electric-towers and freezing-towers that can be built (0 ≤ nf, ne, ns ≤ 20, 1 ≤ nf + ne + ns ≤ 20). The numbers are separated with single spaces.

The second line contains three integer numbers rf, re and rs (1 ≤ rf, re, rs ≤ 1000) — the action radii of fire-towers, electric-towers and freezing-towers. The numbers are separated with single spaces.

The third line contains two integer numbers df and de (1 ≤ df, de ≤ 1000) — the damage a fire-tower and an electronic-tower can inflict on the Main Villain per second (in the case when the Main Villain is in the action radius of the tower). The numbers are separated with single space.

Output

Print the only real number — the maximum possible damage to the Main Villain with absolute or relative error not more than 10 - 6.

Examples

Input

1 0 0
10 10 10
100 100


Output

1989.97487421

Input

1 0 1
10 10 10
100 100


Output

3979.94974843

Note

In the first sample we've got one fire-tower that always inflicts the same damage, independently of its position. 

In the second sample we've got another freezing-tower of the same action radius. If we build the two towers opposite each other, then the Main Villain's speed will be two times lower, whenever he enters the fire-tower's action radius. That means that the enemy will be inflicted with twice more damage.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int inf = 1.01e9;
const double eps = 1e-9;
const int N = 22;
double RES = 0;
double rf, re, rs;
double df, de;
int cnt = 0;
int a[N];
int ac = 0;
int b[N];
int bc = 0;
int nf, ne, ns;
double e[N];
double FI[200];
double EN[200];
double FIRE(int p) {
  double res = rf * 2;
  for (int i = 0; (i) < (bc); ++i) res += FI[abs(b[i] - p)];
  res *= df;
  return res;
}
double ENERGY(int p) {
  double res = re * 2;
  for (int i = 0; (i) < (bc); ++i) res += EN[abs(b[i] - p)];
  res *= de;
  return res;
}
void solve() {
  double val = 0;
  for (int i = 0; (i) < (ac); ++i) {
    double x = FIRE(a[i]);
    double y = ENERGY(a[i]);
    e[i] = x - y;
    val += y;
  }
  sort(e, e + ac);
  reverse(e, e + ac);
  for (int i = 0; (i) < (nf); ++i) val += e[i];
  RES = max(RES, val);
}
void go(int x, int y, int pos, int cnt1 = 0, int cnt2 = 0) {
  if (x == 0 && y == 0) {
    cnt++;
    solve();
    return;
  }
  if (x >= 1 && cnt1 < 2) {
    a[ac++] = pos;
    go(x - 1, y, pos + 1, cnt1 + 1, cnt2);
    ac--;
  }
  if (x >= 2) {
    a[ac++] = pos;
    a[ac++] = pos;
    go(x - 2, y, pos + 1, cnt1, cnt2);
    ac--;
    ac--;
  }
  if (y >= 1 && cnt2 < 1) {
    b[bc++] = pos;
    go(x, y - 1, pos + 1, cnt1, cnt2 + 1);
    bc--;
  }
  if (y >= 2) {
    b[bc++] = pos;
    b[bc++] = pos;
    go(x, y - 2, pos + 1, cnt1, cnt2);
    bc--;
    bc--;
  }
  if (x >= 1 && y >= 1) {
    a[ac++] = pos;
    b[bc++] = pos;
    go(x - 1, y - 1, pos + 1, cnt1, cnt2);
    ac--;
    bc--;
  }
}
int main() {
  scanf("%d%d%d", &nf, &ne, &ns);
  scanf("%lf%lf%lf", &rf, &re, &rs);
  scanf("%lf%lf", &df, &de);
  rf = sqrt(max(0., rf * rf - 1));
  re = sqrt(max(0., re * re - 1));
  rs = sqrt(max(0., rs * rs - 1));
  for (int i = 0; i < 100; ++i) {
    double l1 = -rf;
    double r1 = rf;
    double l2 = i - rs;
    double r2 = i + rs;
    FI[i] = max(0., min(r1, r2) - max(l1, l2));
  }
  for (int i = 0; i < 100; ++i) {
    double l1 = -re;
    double r1 = re;
    double l2 = i - rs;
    double r2 = i + rs;
    EN[i] = max(0., min(r1, r2) - max(l1, l2));
  }
  go(nf + ne, ns, 0);
  fprintf(stderr, "%d\n", cnt), fflush(stderr);
  printf("%.10f\n", RES);
  return 0;
}