#include <bits/stdc++.h>
using namespace std;
int h, a, d;
int HPy, ATKy, DEFy;
int HPm, ATKm, DEFm;
bool can(int hp, int def, int atk) {
  int r1 = (atk + ATKy) - DEFm;
  if (r1 <= 0) return 0;
  r1 = HPm / r1 + (HPm % r1 != 0);
  if (r1 * (ATKm - (DEFy + def)) - (HPy + hp) < 0) return 1;
  return 0;
}
int main() {
  cin >> HPy >> ATKy >> DEFy;
  cin >> HPm >> ATKm >> DEFm;
  cin >> h >> a >> d;
  long long mn = 1e9;
  for (int hp = 0; hp <= 1000; hp++)
    for (int def = 0; def <= 100; def++)
      for (int atk = 0; atk <= 200; atk++)
        if (can(hp, def, atk)) mn = min(mn, 1LL * hp * h + def * d + atk * a);
  cout << mn;
  return 0;
}
