#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int defy, defx, atky, atkx, hpy, hpx, c1, c2, c3;
  cin >> hpy >> atky >> defy;
  cin >> hpx >> atkx >> defx;
  cin >> c1 >> c2 >> c3;
  int mn = 1e9;
  for (int i = 0; i < 1000; i++) {
    for (int j = 0; j < 1000; j++) {
      atky += i;
      defy += j;
      if (atky > defx) {
        if (atkx <= defy)
          mn = min(mn, i * c2 + j * c3);
        else {
          int k = (hpx / (atky - defx) + (hpx % (atky - defx) != 0)) *
                  (atkx - defy);
          k++;
          k = max(k - hpy, 0);
          mn = min(mn, c1 * k + c2 * i + c3 * j);
        }
      }
      atky -= i;
      defy -= j;
    }
  }
  cout << mn;
  return 0;
}
