#include <bits/stdc++.h>
using namespace std;
int hp[2], atk[2], def[2], h, a, d;
bool check(int h0, int h1, int atk0, int atk1, int def0, int def1) {
  if (atk0 - def1 <= 0) return false;
  if (atk1 - def0 <= 0) return true;
  int t0 = atk0 - def1, t1 = atk1 - def0;
  int tim0 = (h1 + t0 - 1) / (t0);
  int tim1 = (h0 + t1 - 1) / (t1);
  return (tim0 < tim1);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> hp[0] >> atk[0] >> def[0];
  cin >> hp[1] >> atk[1] >> def[1];
  cin >> h >> a >> d;
  int ans = 1e9;
  for (int j = 0; j < 300; j++)
    for (int k = 0; k < 300; k++) {
      int l = -1, r = 1e8 + 1;
      while (r - l > 1) {
        int mid = (l + r) / 2;
        if (check(hp[0] + mid, hp[1], atk[0] + j, atk[1], def[0] + k, def[1])) {
          r = mid;
        } else {
          l = mid;
        }
      }
      ans = min(ans, r * h + j * a + k * d);
    }
  cout << ans << endl;
  return 0;
}
