#include <bits/stdc++.h>
using namespace std;
int hpy, atky, defy;
int hpm, atkm, defm;
int hp, at, de, sol = INT_MAX, mon;
int main() {
  scanf("%d %d %d", &hpy, &atky, &defy);
  scanf("%d %d %d", &hpm, &atkm, &defm);
  scanf("%d %d %d", &hp, &at, &de);
  for (int i = 0; i <= 1000; i++)
    for (int h = 0; h <= 200; h++)
      for (int j = 0; j <= 100; j++) {
        int mons = max(0, (atky + h) - defm);
        int yang = max(0, atkm - (defy + j));
        if (mons == 0) continue;
        int eksi = hpm / mons;
        if (hpm % mons != 0) eksi++;
        if ((hpy + i) - (eksi * yang) > 0)
          sol = min(sol, (i * hp) + (h * at) + (j * de));
      }
  printf("%d", sol);
}
