#include <bits/stdc++.h>
using namespace std;
int h1, a1, d1, h2, a2, d2, h, a, d;
int main() {
  cin >> h1 >> a1 >> d1 >> h2 >> a2 >> d2;
  cin >> h >> a >> d;
  int ans = 1e9;
  for (int i = 0; i <= 10100; i++)
    for (int j = 0; j <= 201; j++)
      for (int k = 0; k <= 101; k++) {
        if (a1 + j <= d2) continue;
        int atk = a1 + j - d2;
        int t = (h2 + atk - 1) / atk;
        if (t * (a2 - (d1 + k)) < h1 + i) {
          ans = min(ans, h * i + a * j + d * k);
        }
      }
  cout << ans;
  return 0;
}
