#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
const int N = (int)2e4 + 7;
const int MOD = (int)1e9 + 7;
const int INF = (int)2e7;
const long long BIG = 1e18;
bool who_win(int hpf, int atkf, int deff, int hps, int atks, int defs) {
  if (hps <= 0 && hpf > 0) return true;
  int mf = max(0, atkf - defs);
  int ms = max(0, atks - deff);
  if (mf == 0 && ms == 0) return false;
  int l = 0, r = N, ans = INF;
  while (l <= r) {
    int m = (r + l) >> 1;
    if (hps - mf * m <= 0 || hpf - ms * m <= 0) {
      ans = m;
      r = m - 1;
    } else {
      l = m + 1;
    }
  }
  hps -= mf * ans, hpf -= ms * ans;
  if (hps <= 0 && hpf > 0)
    return true;
  else
    return false;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  int ans = INF;
  int hf, af, df, hs, as, ds;
  int vv, ww, xx;
  cin >> hf >> af >> df >> hs >> as >> ds;
  cin >> vv >> ww >> xx;
  for (int new_atk = af; new_atk <= max(ds + hs, af); new_atk++) {
    for (int new_def = df; new_def <= max(as, df); new_def++) {
      int l = 0, r = N, tp = INF;
      while (l <= r) {
        int m = (r + l) >> 1;
        if (who_win(hf + m, new_atk, new_def, hs, as, ds)) {
          tp = m;
          r = m - 1;
        } else {
          l = m + 1;
        }
      }
      ans = min(ans, (new_atk - af) * ww + (new_def - df) * xx + tp * vv);
    }
  }
  cout << ans;
  return 0;
}
