#include <bits/stdc++.h>
using namespace std;
int HPy;
int ATKy;
int DEFy;
int HPm;
int ATKm;
int DEFm;
int h;
int a;
int d;
int main() {
  cin >> HPy >> ATKy >> DEFy >> HPm >> ATKm >> DEFm >> h >> a >> d;
  int ans = INT_MAX;
  for (int i = 0; i <= 300; i++) {
    for (int j = 0; j <= 300; j++) {
      int AT = ATKy + i;
      int DE = DEFy + j;
      if (AT <= DEFm) {
        continue;
      }
      int need = HPm / (AT - DEFm);
      if (HPm % (AT - DEFm)) {
        need++;
      }
      int sa = ATKm - DE;
      sa *= need;
      int want = max(0, sa + 1 - HPy);
      int cost = want * h + i * a + j * d;
      ans = min(ans, cost);
    }
  }
  printf("%d\n", ans);
  return 0;
}
