#include <bits/stdc++.h>
using namespace std;
int main() {
  long long hy, ay, dy, h, a, d, hm, am, dm;
  cin >> hy >> ay >> dy;
  cin >> hm >> am >> dm;
  cin >> h >> a >> d;
  long long ans = INT_MAX;
  for (long long i = 0; i <= 200; i++) {
    for (long long j = 0; j <= 200; j++) {
      long long x = ay + i;
      long long y = dy + j;
      long long diff1 = max(0LL, (am - y));
      long long diff2 = max(0LL, (x - dm));
      long long cst = 0;
      cst = (i * a) + (j * d);
      if (diff2) {
        long long day = (hm / diff2);
        if (hm % diff2) day++;
        long long sec = (day * diff1);
        if (hy > sec) {
          ans = min(ans, cst);
        } else {
          long long re = day * diff1 - hy + 1;
          ans = min(ans, cst + re * h);
        }
      }
    }
  }
  cout << ans << endl;
  return 0;
}
