#include <bits/stdc++.h>
using namespace std;
int main() {
  int(a), (b);
  scanf("%d%d", &(a), &(b));
  int(c), (d);
  scanf("%d%d", &(c), &(d));
  int(e), (f);
  scanf("%d%d", &(e), &(f));
  int(c1), (c2);
  scanf("%d%d", &(c1), &(c2));
  int(c3);
  scanf("%d", &(c3));
  int cost = 1000000000;
  for (int(j) = 0; (j) < (200); (j)++) {
    for (int(k) = 0; (k) < (200); (k)++) {
      int temp = j * c2 + k * c3;
      b += j;
      c += k;
      int t2;
      if (b - f <= 0) {
        b -= j;
        c -= k;
        continue;
      } else {
        t2 = d / (b - f);
        t2 += (d % (b - f)) ? 1 : 0;
        temp += max(t2 * (max(0, e - c)) + 1 - a, 0) * c1;
        if (temp < cost) cost = temp;
      }
      b -= j;
      c -= k;
    }
  }
  printf("%d\n", cost);
  return 0;
}
