#include <bits/stdc++.h>
using namespace std;
int main() {
  int hy, ay, dy, hm, am, dm, h, a, d;
  scanf("%d%d%d", &hy, &ay, &dy);
  scanf("%d%d%d", &hm, &am, &dm);
  scanf("%d%d%d", &h, &a, &d);
  int ans = 1000000000;
  for (int j = 0; j <= 200; j++) {
    int aa = ay + j;
    if (dm - aa >= 0) continue;
    for (int k = 0; k <= 200; k++) {
      int dd = dy + k;
      int num = (hm % (aa - dm) ? 1 : 0) + hm / (aa - dm);
      int hp = num * (am - dd);
      if (hp < hy)
        ans = min(ans, j * a + k * d);
      else
        ans = min(ans, (hp - hy + 1) * h + j * a + k * d);
    }
  }
  printf("%d\n", ans);
  return 0;
}
