#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
typedef struct {
  int hp;
  int atk;
  int def;
} unit_t;
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 answer = numeric_limits<int>::max();
  int hp, atk, def;
  for (atk = 0; atk < 200; atk++) {
    int damage_given = max(0, (yang.atk + atk) - monster.def);
    if (damage_given == 0) continue;
    for (def = 0; def < 100; def++) {
      int damage_taken = max(0, monster.atk - (yang.def + def));
      if (damage_taken == 0) {
        hp = 0;
      } else {
        int turn = (monster.hp - 1) / damage_given + 1;
        hp = max(0, turn * damage_taken + 1 - yang.hp);
      }
      answer = min(answer, atk * cost.atk + def * cost.def + hp * cost.hp);
    }
  }
  cout << answer << endl;
  return 0;
}
