#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long INF = mod * mod;
const long double eps = 1e-6;
const long double pi = acos(-1.0);
void solve() {
  int s[3];
  int e[3];
  int c[3];
  for (int i = 0; i < 3; i++) cin >> s[i];
  for (int i = 0; i < 3; i++) cin >> e[i];
  for (int i = 0; i < 3; i++) cin >> c[i];
  int ans = mod;
  for (int i = 0; i < 201; i++) {
    for (int j = 0; j < 201; j++) {
      int sum = c[1] * i + c[2] * j;
      int decs = max(0, e[1] - s[2] - j);
      int dece = max(0, s[1] + i - e[2]);
      if (dece == 0) continue;
      int t = (e[0] + dece - 1) / dece;
      int needhp = t * decs + 1;
      int dif = needhp - s[0];
      if (dif > 0) {
        sum += dif * c[0];
      }
      ans = min(ans, sum);
    }
  }
  cout << ans << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
