#include <bits/stdc++.h>
using namespace std;
int hp_m, atk_m, def_m, h, a, d;
bool eval(int health, int defense, int attack) {
  if (attack <= def_m) return false;
  int moves = ((hp_m + attack - def_m - 1) / (attack - def_m));
  return ((health - ((atk_m - defense) * moves)) > 0);
}
int func(int defense, int attack) {
  int beg = 1;
  int end = 10000;
  int ans = -1;
  while (beg <= end) {
    int mid = beg + (end - beg) / 2;
    bool ok = eval(mid, defense, attack);
    if (ok) {
      ans = mid;
      end = mid - 1;
    } else
      beg = mid + 1;
  }
  return ans;
}
int main() {
  int hp_y, atk_y, def_y;
  cin >> hp_y >> atk_y >> def_y;
  cin >> hp_m >> atk_m >> def_m;
  cin >> h >> a >> d;
  int ans = 0x3f3f3f3f;
  for (int defense = def_y; defense <= 100; defense++) {
    for (int attack = atk_y; attack <= 200; attack++) {
      int health = func(defense, attack);
      if (health == -1) continue;
      ans = min(ans, (max(0, health - hp_y)) * h + (defense - def_y) * d +
                         (attack - atk_y) * a);
    }
  }
  cout << ans;
  return 0;
}
