#include <bits/stdc++.h>
using namespace std;
int fun(int attack, int defence) { return max(0, attack - defence); }
bool check(int H, int am, int D, int hm, int A, int dm) {
  return !fun(am, D) || (H - 1) / fun(am, D) > (hm - 1) / fun(A, dm);
}
int main() {
  int hy, ay, dy;
  int hm, am, dm;
  int h, a, d;
  int ans = 1000000000;
  cin >> hy >> ay >> dy;
  cin >> hm >> am >> dm;
  cin >> h >> a >> d;
  if (am <= dy) {
    cout << max(0, dm + 1 - ay) * a << endl;
    return 0;
  }
  for (int i = 0; i < 10000; ++i) {
    for (int j = 0; j < 350; ++j) {
      int H = hy + i;
      int A = ay + j;
      if (fun(A, dm) == 0) {
        continue;
      }
      int first = dy;
      int last = am;
      while (first < last) {
        int mid = (last + first) / 2;
        if (check(H, am, mid, hm, A, dm)) {
          last = mid;
        } else {
          first = mid + 1;
        }
      }
      int D = first;
      if (!fun(am, D) || ((H - 1) / fun(am, D) > (hm - 1) / fun(A, dm))) {
        if (h * i + a * j + d * (first - dy) < ans) {
          ans = h * i + a * j + d * (first - dy);
        }
      }
    }
  }
  cout << ans << endl;
  return 0;
}
