#include <bits/stdc++.h>
using namespace std;
const long long int inf = 1e18;
long long int a[1000005];
long long int n, m, k, d, l, i, w, r, j, x, y, in1, in2, h, f,
    mn = LLONG_MAX, mx = 0, t, c, q, ans;
map<char, int> mp;
string z;
map<long long int, long long int>::iterator it;
map<long long int, long long int>::reverse_iterator rt;
vector<string> v;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int hy, ay, dy, hm, am, dm, ch, ca, cd, ty, tm;
  cin >> hy >> ay >> dy >> hm >> am >> dm >> ch >> ca >> cd;
  ans = 100000;
  for (i = 0; i <= 1000; i++) {
    for (j = 0; j <= 1000; j++) {
      k = 10000;
      l = 0;
      h = 1000;
      while (l <= h) {
        m = (l + h) / 2;
        x = ay + j - dm;
        y = am - dy - m;
        if (x <= 0) {
          l = m + 1;
          continue;
        }
        ty = hm / x;
        if (hm % x) ty++;
        if (y <= 0)
          tm = 10000000;
        else {
          tm = (hy + i) / y;
          if ((hy + i) % y) tm++;
        }
        if (ty < tm) {
          k = min(k, m);
          h = m - 1;
        } else
          l = m + 1;
      }
      if (k != 10000) ans = min(ans, i * ch + j * ca + k * cd);
    }
  }
  cout << ans;
}
