#include <bits/stdc++.h>
using namespace std;
const long long maxn = 105;
long long Y[3];
long long M[3];
long long p[3];
long long mmax(long long a, long long b) { return a > b ? a : b; }
long long mmin(long long a, long long b) { return a < b ? a : b; }
long long getchp(long long aa, long long ad) {
  long long att = Y[1] + aa;
  long long def = Y[2] + ad;
  long long rounds = M[0] / (att - M[2]);
  if (rounds * (att - M[2]) < M[0]) ++rounds;
  long long loshp = mmax(0, M[1] - def) * rounds;
  return p[0] * mmax(0, loshp - Y[0] + 1);
}
int main() {
  for (int i = 0; i < 3; ++i) cin >> Y[i];
  for (int i = 0; i < 3; ++i) cin >> M[i];
  for (int i = 0; i < 3; ++i) cin >> p[i];
  long long minc = 101 * p[1] + 100 * p[2];
  long long bascc = 0;
  if (Y[1] <= M[2]) {
    bascc = (M[2] + 1 - Y[1]) * p[1];
    Y[1] = M[2] + 1;
  }
  for (long long aa = 0; aa <= 301; ++aa) {
    for (long long ad = 0; ad <= 101; ++ad) {
      long long chp = getchp(aa, ad);
      long long cc = bascc + chp + aa * p[1] + ad * p[2];
      minc = mmin(minc, cc);
    }
  }
  cout << minc << endl;
  return 0;
}
