#include <bits/stdc++.h>
using namespace std;
int main() {
  int hpy, hpm, atky, atkm, defy, defm;
  while (cin >> hpy >> atky >> defy) {
    cin >> hpm >> atkm >> defm;
    int hp, atk, def;
    cin >> hp >> atk >> def;
    int ans = 0x3f3f3f3f;
    int resi = 0, resj = 0, resk = 0;
    for (int i = 0; i <= 100; ++i) {
      int dy = max(0, atkm - defy - i);
      if (dy == 0 && atky - defm > 0) {
        if (ans > i * def) {
          ans = i * def;
          resi = i;
        }
        break;
      }
      for (int j = 0; j <= 200; ++j) {
        int dm = max(0, atky + j - defm);
        if (dm == 0) continue;
        for (int k = 0; k <= 10000; ++k) {
          int d = hpm / dm;
          if (hpm % dm) d++;
          if (hpy + k - dy * d > 0) {
            if (ans > i * def + j * atk + k * hp) {
              ans = i * def + j * atk + k * hp;
              resi = i;
              resj = j;
              resk = k;
            }
            break;
          }
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}
