#include <bits/stdc++.h>
using namespace std;
int ay, dy, hpy, am, dm, hpm;
int ap, dp, hpp;
int main() {
  scanf("%d%d%d%d%d%d%d%d%d", &hpy, &ay, &dy, &hpm, &am, &dm, &hpp, &ap, &dp);
  int hhm, hhy, ddy, aay, tot = 0, mini = 1e9;
  for (int i = 0; i <= 5000; i++) {
    for (int j = 0; j <= 5000; j++) {
      hhm = hpm;
      hhy = hpy;
      aay = ay + j, ddy = dy + i;
      tot = i * dp + j * ap;
      if (aay - dm < 1)
        continue;
      else {
        int stps = hhm / (aay - dm);
        hhm -= stps * (aay - dm);
        if (hhm) {
          stps++;
          hhm -= (aay - dm);
        }
        hhy -= stps * (am - ddy);
      }
      if (hhy < 1) tot += (abs(hhy) + 1) * hpp;
      if (hhm < 1 && tot < mini) {
        mini = tot;
      }
    }
  }
  printf("%d\n", mini);
  return 0;
}
