#include <bits/stdc++.h>
using namespace std;
int hp[2], att[2], def[2], n, m, k, a, b, c, x, y, ans(1e9);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> hp[0] >> att[0] >> def[0];
  cin >> hp[1] >> att[1] >> def[1];
  cin >> a >> b >> c;
  for (int i = 0; i <= 1000; i++) {
    for (int j = 0; j <= 200; j++) {
      for (int l = 0; l <= 100; l++) {
        x = 0, y = 0;
        n = hp[0] + i;
        m = att[0] + j;
        k = def[0] + l;
        if (m > def[1]) {
          x = (hp[1] + m - def[1] - 1) / (m - def[1]);
        }
        if (k < att[1]) {
          y = (n + att[1] - k - 1) / (att[1] - k);
        }
        if (x == 0) {
          continue;
        } else if (y == 0) {
          if (x > 0) {
            ans = min(ans, i * a + j * b + l * c);
          }
        } else if (x < y) {
          ans = min(ans, i * a + j * b + l * c);
        }
      }
    }
  }
  cout << ans << '\n';
  return 0;
}
