#include <bits/stdc++.h>
using namespace std;
struct unit_t {
  int hp;
  int atk;
  int def;
};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  unit_t yang, monster, cost;
  cin >> yang.hp >> yang.atk >> yang.def;
  cin >> monster.hp >> monster.atk >> monster.def;
  cin >> cost.hp >> cost.atk >> cost.def;
  int atk, def;
  int answer = numeric_limits<int>::max();
  unit_t purchase;
  for (atk = 0; yang.atk + atk <= 200; atk++) {
    int damage_given = max(0, yang.atk + atk - monster.def);
    if (damage_given == 0) {
      continue;
    }
    for (def = 0; yang.def + def <= 100; def++) {
      int damage_taken = max(0, monster.atk - yang.def - def);
      int hp = max(0, ((monster.hp - 1) / damage_given + 1) * damage_taken + 1 -
                          yang.hp);
      int candidate = cost.hp * hp + cost.atk * atk + cost.def * def;
      if (candidate < answer) {
        answer = candidate;
        purchase.hp = hp;
        purchase.atk = atk;
        purchase.def = def;
      }
    }
  }
  cerr << purchase.hp << ' ' << purchase.atk << ' ' << purchase.def << endl;
  cout << answer << endl;
  return 0;
}
