#include <bits/stdc++.h>
int main() {
  int HPY, ATKY, DEFY, HPM, ATKM, DEFM, h, a, d;
  while (scanf("%d %d %d", &HPY, &ATKY, &DEFY) == 3) {
    scanf("%d %d %d", &HPM, &ATKM, &DEFM);
    scanf("%d %d %d", &h, &a, &d);
    int mini = 1000000000;
    for (int i = ATKY; i <= 301; i++)
      for (int j = DEFY; j <= 301; j++) {
        if (i - DEFM > 0) {
          int cost = (i - ATKY) * a + (j - DEFY) * d;
          int p1 = i - DEFM;
          int k1 = HPM / p1;
          if (HPM % p1 != 0) k1++;
          int p2 = ATKM - j;
          if (p2 > 0) {
            int p3 = p2 * k1 + 1;
            if (HPY < p3) cost += (p3 - HPY) * h;
          }
          if (cost < mini) mini = cost;
        }
      }
    printf("%d\n", mini);
  }
  return 0;
}
