#include <bits/stdc++.h>
using namespace std;
bool l(long a) {
  bool f = false;
  a = abs(a);
  while (a > 0) {
    if (a % 10 == 8) {
      f = true;
    }
    a /= 10;
  }
  return (f);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long h1, h2, a1, a2, d1, d2;
  long ch, ca, cd;
  cin >> h1 >> a1 >> d1;
  cin >> h2 >> a2 >> d2;
  cin >> ch >> ca >> cd;
  long ans = 1000000000;
  for (int i = 0; i < 1000; i++) {
    for (int j = 0; j < 1000; j++) {
      long ccost = 0;
      long dps1 = a1 + i - d2, dps2 = a2 - d1 - j;
      if (dps1 <= 0) continue;
      long nattack1 = h2 / dps1;
      if (h2 % dps1 != 0) nattack1++;
      long hp = h1 - dps2 * nattack1;
      if (hp <= 0) {
        ccost += abs(hp - 1) * ch;
      }
      ans = min(ans, ccost + i * ca + j * cd);
    }
  }
  cout << ans;
  return 0;
}
