#include <bits/stdc++.h>
using namespace std;
int main() {
  int HPY, ATKY, DEFY;
  cin >> HPY >> ATKY >> DEFY;
  int HPM, ATKM, DEFM;
  cin >> HPM >> ATKM >> DEFM;
  int h, a, d;
  HPY--;
  cin >> h >> a >> d;
  int ans = 9999999;
  for (int i = 0; i < 230; i++) {
    if (ATKY + i > DEFM) {
      for (int j = 0; j < 100; j++) {
        int temp = i * a + j * d;
        int D = j + DEFY;
        int A = i + ATKY - DEFM;
        int t = (HPM + A - 1) / (A);
        temp += max(t * (ATKM - D) - HPY, 0) * h;
        ans = min(temp, ans);
      }
    }
  }
  cout << ans << endl;
  return 0;
}
