#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans = 1 << 30;
  int hy, fy, ay;
  int hm, fm, am;
  int ph, pf, pa;
  scanf("%d%d%d", &hy, &ay, &fy);
  scanf("%d%d%d", &hm, &am, &fm);
  scanf("%d%d%d", &ph, &pa, &pf);
  int ss = 0;
  for (int i = ay; i <= 200; i++) {
    if (i <= fm) continue;
    for (int j = fy; j <= 100; j++) {
      int t = pa * (i - ay) + pf * (j - fy);
      int tmp = hm / (i - fm);
      if (hm % (i - fm)) tmp++;
      if (am <= j)
        ans = min(ans, t);
      else {
        t += ph * (max(0, tmp * (am - j) - hy + 1));
        ans = min(ans, t);
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
