#include <bits/stdc++.h>
using namespace std;
int hp1, atk1, def1;
int hp2, atk2, def2;
int main() {
  while (scanf("%d %d %d", &hp1, &atk1, &def1) == 3) {
    scanf("%d %d %d", &hp2, &atk2, &def2);
    int a, b, c;
    scanf("%d %d %d", &a, &b, &c);
    int cost = 0x3f3f3f3f;
    for (int i = max(atk1, def2 + 1); i <= 300; i++) {
      for (int j = def1; j <= 200; j++) {
        int time;
        if (hp2 % (i - def2) == 0)
          time = hp2 / (i - def2);
        else
          time = hp2 / (i - def2) + 1;
        int p = time * (atk2 - j) + 1;
        if (p >= hp1)
          p = p - hp1;
        else
          p = 0;
        cost = min(cost, p * a + b * (i - atk1) + c * (j - def1));
      }
    }
    printf("%d\n", cost);
  }
  return 0;
}
