#include <bits/stdc++.h>
using namespace std;
long long val(long long x, long long y, long long z) {
  if (max(y - z, 0ll) == 0ll) return LLONG_MAX / 2;
  return (x / (y - z)) + bool(x % (y - z));
}
int main() {
  long long hy, atky, defy;
  long long hm, atkm, defm;
  long long h, a, d;
  cin >> hy >> atky >> defy;
  cin >> hm >> atkm >> defm;
  cin >> h >> a >> d;
  long long ans = LLONG_MAX / 2;
  for (long long attack = 0; attack <= 200; ++attack) {
    for (long long defence = 0; defence <= 200; ++defence) {
      for (long long turns = 0; turns <= 200; ++turns) {
        long long HPNEEDED = turns * max(0ll, (atkm - (defy + defence)));
        if (hm <= turns * (atky + attack - (defm))) {
          ans = min(ans, attack * a + defence * d +
                             h * (max(HPNEEDED - hy + 1, 0ll)));
        }
      }
    }
  }
  cout << ans << endl;
  return 0;
}
