#include <bits/stdc++.h>
using namespace std;
int hp_y, atk_y, def_y;
int hp_m, atk_m, def_m;
int h, a, d;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int tc = 1;
  while (tc--) {
    cin >> hp_y >> atk_y >> def_y;
    cin >> hp_m >> atk_m >> def_m;
    cin >> h >> a >> d;
    int res = INT_MAX;
    for (int i = atk_y; i <= 200; i++)
      for (int j = def_y; j <= 200; j++) {
        int ad_atk = i - atk_y;
        int ad_def = j - def_y;
        int dec_y = max(atk_m - j, 0);
        int dec_m = max(i - def_m, 0);
        if (dec_m == 0) continue;
        double time_y = (double)hp_y / dec_y;
        int time_m = ceil((double)hp_m / dec_m);
        int ad_hp = time_m * dec_y - hp_y + 1;
        if (ad_hp < 0) ad_hp = 0;
        res = min(res, h * ad_hp + a * ad_atk + d * ad_def);
      }
    cout << res;
  }
  return 0;
}
