#include <bits/stdc++.h>
using namespace std;
int H, A, D, MH, MA, MD;
int main() {
  int a, b, c;
  cin >> H >> A >> D;
  cin >> MH >> MA >> MD;
  cin >> a >> b >> c;
  int ans = 1000000;
  for (int j = 0; j <= 6000; ++j)
    for (int k = 0; k <= 6000; ++k) {
      int AA = A + j;
      int DD = D + k;
      int A = max(0, AA - MD) ? (MH + max(0, AA - MD) - 1) / max(0, AA - MD)
                              : 1000000000;
      if (A == 1000000000) continue;
      int HH = A * max(0, MA - DD) + 1;
      int i = max(0, HH - H);
      ans = min(ans, a * i + b * j + c * k);
    }
  cout << ans << endl;
  return 0;
}
