#include <bits/stdc++.h>
using namespace std;
int main() {
  int hpy, atky, defy;
  cin >> hpy >> atky >> defy;
  int hpm, atkm, defm;
  cin >> hpm >> atkm >> defm;
  int h, ak, d;
  cin >> h >> ak >> d;
  int decy = atkm - defy;
  int decm = atky - defm;
  int a = INT_MAX;
  for (int i = 0; i <= 1000; ++i) {
    for (int j = 0; j <= 200; ++j) {
      for (int k = 0; k <= 200; ++k) {
        if ((atkm - (defy + k)) <= 0)
          decy = 55555555;
        else {
          decy = (hpy + i) / (atkm - (defy + k));
          if (decy > 0 && (hpy + i) % (atkm - (defy + k)) != 0) decy++;
          if (decy == 0) decy++;
        }
        if ((atky + j) - defm <= 0)
          decm = 55555555;
        else {
          decm = hpm / ((atky + j) - defm);
          if (decm > 0 && hpm % ((atky + j) - defm) != 0) decm++;
          if (decm == 0) decm++;
        }
        if (decy > decm) {
          a = min(a, (i * h) + (j * ak) + (k * d));
        }
      }
    }
  }
exit:;
  cout << a << '\n';
}
