#include <bits/stdc++.h>
using namespace std;
int main() {
  int hpy, atty, defy, hpm, attm, defm, pricehp, priceatt, pricedef, maxx;
  int zivotm, zivoty, zbir, i, j, z;
  int hpnew, attnew, defnew;
  cin >> hpy >> atty >> defy;
  cin >> hpm >> attm >> defm;
  cin >> pricehp >> priceatt >> pricedef;
  bool ok;
  maxx = 10000000000;
  for (i = 0; i <= 1000; i++) {
    for (j = 0; j <= 200; j++) {
      ok = false;
      for (z = 0; z <= 200; z++) {
        hpnew = hpy + i;
        attnew = atty + j;
        defnew = defy + z;
        if ((attnew - defm <= 0) || (hpm % max(0, (attnew - defm)) == 0)) {
          if (attnew - defm <= 0)
            zivotm = 100000000;
          else
            zivotm = hpm / max(0, (attnew - defm));
        } else {
          zivotm = hpm / max(0, (attnew - defm));
          zivotm++;
        }
        if ((attm - defnew <= 0) || (hpnew % max(0, (attm - defnew)) == 0)) {
          if (attm - defnew <= 0)
            zivoty = 100000000;
          else
            zivoty = hpnew / max(0, (attm - defnew));
        } else {
          zivoty = hpnew / max(0, (attm - defnew));
          zivoty++;
        }
        if (zivotm < zivoty) {
          ok = true;
          if (i * pricehp + j * priceatt + z * pricedef < maxx)
            maxx = i * pricehp + j * priceatt + z * pricedef;
        }
        if (ok == true) break;
      }
    }
  }
  cout << maxx;
  return 0;
}
