#include <bits/stdc++.h>
using namespace std;
int hp[2], atk[2], def[2];
int h, a, d;
int main() {
  cin >> hp[0] >> atk[0] >> def[0];
  cin >> hp[1] >> atk[1] >> def[1];
  cin >> h >> a >> d;
  int ans = 1e9;
  int upDef = 0;
  int upAtk = 0;
  for (int H = 0; H <= 1000; H++) {
    for (int A = 0; A <= 200; A++) {
      for (int D = 0; D <= 200; D++) {
        int damage = max(0, atk[0] + A - def[1]);
        int turn;
        if (damage == 0) {
          continue;
        }
        int dmgMons = max(0, (atk[1] - (def[0] + D)));
        if (damage != 0) {
          turn = hp[1] / damage;
          if (hp[1] - turn * damage > 0) {
            turn++;
          }
        }
        if (hp[0] + H - turn * dmgMons > 0) {
          ans = min(ans, H * h + A * a + d * D);
        }
      }
    }
  }
  cout << ans;
  return 0;
}
