#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 30;
int h, a, d;
bool can(int hpy, int atky, int defy, int hpm, int atkm, int defm) {
  int x = max(0, atky - defm);
  int y = max(0, atkm - defy);
  if (x == 0) return false;
  int z = hpm / x;
  if (hpm % x != 0) z++;
  if (hpy - y * z <= 0) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int hpy, atky, defy;
  int hpm, atkm, defm;
  cin >> hpy >> atky >> defy;
  cin >> hpm >> atkm >> defm;
  cin >> h >> a >> d;
  int res = inf;
  for (int i = 0; i <= 1000; i++) {
    for (int j = 0; j <= 200; j++) {
      for (int k = 0; k <= 200; k++) {
        if (can(hpy + i, atky + j, defy + k, hpm, atkm, defm)) {
          res = min(res, i * h + j * a + k * d);
          break;
        }
      }
    }
  }
  cout << res;
  return 0;
}
