#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e2 + 11;
int mhp, matk, mdef;
int hp, atk, def;
int h, a, d;
int needhp(int curatk, int curdef) {
  if (curatk <= def) {
    return -1;
  }
  if (curdef >= atk) {
    return 0;
  }
  int delatk = curatk - def;
  int deldef = atk - curdef;
  int t = (hp + delatk - 1) / delatk;
  return t * deldef + 1;
}
int cal(int curatk, int curdef) {
  int val = needhp(curatk, curdef);
  if (val == -1) {
    return -1;
  }
  int ret = 0;
  if (val > mhp) {
    ret += (val - mhp) * h;
  }
  if (curatk > matk) {
    ret += (curatk - matk) * a;
  }
  if (curdef > mdef) {
    ret += (curdef - mdef) * d;
  }
  return ret;
}
int main() {
  scanf("%d%d%d", &mhp, &matk, &mdef);
  scanf("%d%d%d", &hp, &atk, &def);
  scanf("%d%d%d", &h, &a, &d);
  int ans = ~0u >> 1;
  for (int i = 1; i < maxn; ++i) {
    for (int j = 1; j < maxn; ++j) {
      int tmp = cal(i, j);
      if (tmp != -1) {
        ans = min(ans, tmp);
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
