#include <bits/stdc++.h>
using namespace std;
int H[5], A[5], D[5];
int CH, CA, CD;
int ansh, ansd, ansa;
const int INF = 1000000000;
int main() {
  cin >> H[1] >> A[1] >> D[1];
  cin >> H[2] >> A[2] >> D[2];
  cin >> CH >> CA >> CD;
  int ans = 0x7fffffff;
  bool flag = false;
  for (int a1 = A[1]; a1 <= 200; a1++)
    for (int d1 = D[1]; d1 <= 100; d1++) {
      int turn2;
      int h2 = H[2];
      int delta2 = max(0, a1 - D[2]);
      int delta1 = max(0, A[2] - d1);
      if (delta2) {
        if (h2 % delta2 == 0)
          turn2 = h2 / delta2;
        else
          turn2 = h2 / delta2 + 1;
      } else
        turn2 = INF;
      if (turn2 == INF)
        continue;
      else {
        int h1 = turn2 * delta1;
        if (h1 < H[1])
          ans = min((a1 - A[1]) * CA + (d1 - D[1]) * CD, ans);
        else
          ans = min((a1 - A[1]) * CA + (d1 - D[1]) * CD + (h1 - H[1] + 1) * CH,
                    ans);
      }
    }
  cout << ans << endl;
  return 0;
}
