#include <bits/stdc++.h>
using namespace std;
int getTime(int distance, int rate) {
  if (rate <= 0) {
    return 1000000007;
  }
  return (distance + rate - 1) / rate;
}
int bestTime[10005];
int main() {
  int i, j, k, yhp, yatk, ydf, yyhp, yyatk, yydf, mhp, matk, mdf, h, a, d,
      bestanswer, curr;
  cin >> yhp >> yatk >> ydf >> mhp >> matk >> mdf >> h >> a >> d;
  bestanswer = 1000000007;
  fill(bestTime, bestTime + 10005, 1000000007);
  for (i = 0; i <= 1000; i++) {
    for (k = 0; k <= 1000; k++) {
      yyhp = yhp + i;
      yydf = ydf + k;
      curr = getTime(yyhp, matk - yydf);
      if (curr == 1000000007) {
        bestTime[0] = min(bestTime[0], i * h + k * d);
      } else if (curr < 10000) {
        bestTime[curr] = min(bestTime[curr], i * h + k * d);
      }
    }
  }
  bestTime[10000] = min(bestTime[10000], bestTime[0]);
  for (i = 10000; i >= 1; i--) {
    bestTime[i] = min(bestTime[i], bestTime[i + 1]);
  }
  for (j = max(0, mdf - yatk + 1); j <= 700; j++) {
    yyatk = yatk + j;
    curr = getTime(mhp, yyatk - mdf) + 1;
    if (curr < 10000) {
      bestanswer = min(bestanswer, bestTime[curr] + j * a);
    }
  }
  cout << bestanswer;
  return 0;
}
